def setchess():
    loader.init('place')
    sdict = loader.read_db()
    get_input(items=[i for i in sdict.keys()])
    #poses=sdict[list(sdict.keys())[0]]
    poses = sdict[NAME]
    atris = list(attribute.keys())[:-1]
    for i in range(5):
        for j in (0, 1):
            #print(sdict[i])
            Chess(atris[i] + '神', poses[i][j])
            Chess(atris[i] + '仙', 55 - poses[i][j])
    Chess('王神', poses[5][0])
    Chess('王仙', 55 - poses[5][0])
Beispiel #2
0
def main():
    DIS = pygame.display.set_mode((500, 500))
    DIS.fill((255, 255, 255))
    loader.init('place')
    stra_dict = loader.read_db()
    items = [i for i in stra_dict.keys()]
    #items=['诛仙','默认','Default','龙蛇','蛇皮']
    mylister = Lister(items, DIS, pos=(50, 50), max_list=4)
    mylister.callback = print
    while True:
        for event in pygame.event.get():
            mylister.react(event)
            if event.type == QUIT:
                pygame.quit()
                return
            time.sleep(0.2)
Beispiel #3
0
def init(mod):
    global stra_dict
    loader.init(mod)
    stra_dict = loader.read_db()
Beispiel #4
0
from FiveElements import chess_board, get_input, Chess, Vecter2
from FiveElements import DISPLAYSURF, hlight_pic
from math import copysign
import pygame
from pygame.locals import *
from random import random
import loader  #,putin
from os import _exit

loader.init('place')
stra_dict = loader.read_db()
firstchess = None
firstpos = 0
fpsClock = pygame.time.Clock()
attribute = {'金': 1, '水': 4, '木': 2, '火': 5, '土': 3, '王': 11}
print(stra_dict)
MOVING = []
NAME = ''


def setchess():
    global NAME
    NAME = get_input(items=[i for i in stra_dict.keys()])
    ##    name=input('Please enter the name of map to edit:')
    poses = stra_dict.get(NAME, loader.default_place['默认'])
    atris = list(attribute.keys())[:-1]
    for i in range(5):
        for j in (0, 1):
            #print(sdict[i])
            Chess(atris[i] + '神', poses[i][j])
            Chess(atris[i] + '仙', 55 - poses[i][j])
Beispiel #5
0
from loader import init
from heatmap import heatmap

from IPython.display import display

__version__ = "0.1.1"

init()
Beispiel #6
0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

import loader
loader.init()

import requests

from client import interface, scheme, plugintools, api, debugtools

def test_proxy():
    return
    #ssh -v -N -D 127.0.0.1:1080 test.domain.com

    api.init()

    listener = scheme.PassiveListener('api')
    scheme.register(listener)

    type, host, port = 'socks5', '127.0.0.1', 1080
#*_* coding:utf-8 *_*
import pygame, time, math, poly, chessdrawer
import loader, putin
from pygame.locals import *
from os import _exit

pygame.init()
DISPLAYSURF = pygame.display.set_mode((1024, 650), 0, 32)
pygame.display.set_caption('Fighting...')
loader.init('color')
style = loader.stra_to_color(loader.read_db())['default']
turn = '神'
FPS = 5
fpsClock = pygame.time.Clock()
NAME = ''
firstchess = None
firstpos = 0
attribute = {'金': 1, '木': 2, '土': 3, '水': 4, '火': 5, '王': 11}


class Block:
    def __init__(self, chessboard, i):
        self.chessboard, self.i = chessboard, i
        self.g, self.num = self.chessboard.board.get_group(i)
        self.n = self.g.n

    @property
    def chess(self):
        return self.chessboard._posdict[self.i]

    @chess.setter