• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python soccersimulator.KeyboardStrategy类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中soccersimulator.KeyboardStrategy的典型用法代码示例。如果您正苦于以下问题:Python KeyboardStrategy类的具体用法?Python KeyboardStrategy怎么用?Python KeyboardStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了KeyboardStrategy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: build_apprentissage

def build_apprentissage(fn,generator):
    ex_raw = KeyboardStrategy.read(fn)
    exemples = []
    labels = []
    for x in ex_raw:
        exemples.append(generator(x[1],x[0][0],x[0][1]))
        labels.append(x[0][2])
    return exemples,labels
开发者ID:jordanupmc,项目名称:soccersimulator,代码行数:8,代码来源:decisiontree.py


示例2: KeyboardStrategy

        aa = self.decideur(SoccerStateDecorator(state,id_team,id_player,self.info))
        return aa



#team1=SoccerTeam("team1",[Player("t1j1",StateLessStrategy(random))])
#team2=SoccerTeam("team2",[Player("t2j1",StateLessStrategy(Smart1v1))])

team1=SoccerTeam("team1",[Player("t1j1",StateLessStrategy(random)),Player("t1j2",StateLessStrategy(Smart1v1))])
team2=SoccerTeam("team1",[Player("t2j1",StateLessStrategy(Smart2v2)),Player("t2j2",StateLessStrategy(Smart2v2))])

#team1=SoccerTeam("team1",[Player("t1j1",StateLessStrategy(fonceur)),Player("t1j2",StateLessStrategy(fonceur)),Player("t1j3",StateLessStrategy(fonceur)),Player("t1j4",StateLessStrategy(fonceur))])
#team2=SoccerTeam("team1",[Player("t1j1",StateLessStrategy(Smart1v1)),Player("t1j2",StateLessStrategy(Smart1v1)),Player("t1j3",StateLessStrategy(Smart1v1)),Player("t1j4",StateLessStrategy(Smart1v1))])


strat = KeyboardStrategy() #ou pour une sauvegarde automatique
#KeyboardStrategy(fn="monfichier.exp")
FS = StateLessStrategy(fonceur)
GK = StateLessStrategy(QuickFollow)

strat.add("d",FS)
strat.add("a",GK)
player1 = Player("j1",strat)

team1=SoccerTeam("team1",[player1])
team2=SoccerTeam("team2",[Player("t2j1",StateLessStrategy(Smart1v1))])
match=SoccerMatch(team1,team2)

show(match)
strat.write("monfichier.exp")
开发者ID:ad50144124,项目名称:mon_projet,代码行数:30,代码来源:project.py


示例3: len

# -*- coding: utf-8 -*-
from soccersimulator import SoccerMatch, show, SoccerTeam, Player, KeyboardStrategy
from strategies import *
import sys


if __name__ == "__main__":
    prefix = "test"
    if len(sys.argv) > 1:
        prefix = sys.argv[1]
    strat_g = KeyboardStrategy()
    strat_g.add("t", MarquerStrategy())
    strat_g.add("y", DribleStrategy())
    strat_g.add("z", PasseStrategy())

    team45 = SoccerTeam(
        "team4", [Player("Al", strat_g), Player("xxx", strat_g), Player("Samounette", strat_g), Player("Sam", strat_g)]
    )
    team46 = SoccerTeam(
        "team4",
        [
            Player("S", Defenseur1Strategy()),
            Player("am", Defenseur2Strategy()),
            Player("l", GoalStrategy()),
            Player("As", DribleStrategy()),
        ],
    )
    match = SoccerMatch(team45, team46, 10000)
    show(match)
    strat_g.write(prefix + ".exp", True)
开发者ID:fifa2016,项目名称:projet_foot,代码行数:30,代码来源:entrainer.py


示例4: len

""" Permet de jouer et d'entrainer une strategie
    * changer les strategies ajoutees
    * utilisation : python entrainer prefix_fichier_exemple
    par defaut ajoute au fichier d'exemples sil existe deja
    (extension : .exp pour le fichier exemple)
"""

from soccersimulator import SoccerMatch, show, SoccerTeam,Player,KeyboardStrategy
from strat import *
import sys

if __name__=="__main__":
	prefix = "tree"
	if len(sys.argv)>1:
		prefix = sys.argv[1]
	strat_key = KeyboardStrategy()
	strat_key.add("a",StrategyF())
	strat_key.add("g",StrategyG())
	
	team_noob = SoccerTeam("lobIA",[Player("lobIA", strat_key)])
	team_bad = SoccerTeam("teamTest",[Player("Fonceur",StrategyP())])
	#match = SoccerMatch(team_noob,team_bad,1000)
	match = SoccerMatch(team_bad,team_noob,1000)
	#show(match)
	strat_key.write(prefix+".exp",True)
开发者ID:nihaakey,项目名称:projet2I013,代码行数:25,代码来源:entrainer.py


示例5: KeyboardStrategy

from soccersimulator import Vector2D, Player, SoccerTournament
from Strategies import *
from StratsSpecialise import*
from Outils import *

#############################################################
###### CREATION ET AFFECTATION DES KEYBOARD STRATEGIES  #####
#############################################################


############################################
## Keyb Strategies a tester sur le Milieu ##
############################################


KBS_Milieu = KeyboardStrategy()
KBS_Milieu.add("d",Def4vs4_Strat)
KBS_Milieu.add("g",Attack4vs4_Strat)



############################################
## Keyb Strategies a tester sur le Gardien #
############################################

#creation d'une petite strategie a utiliser
def degager(me):
	res=me.degager
	res.name="degager"
	return res
开发者ID:3408247,项目名称:MonProj,代码行数:30,代码来源:keyb_strats.py


示例6: len

""" Permet de jouer et d'entrainer une strategie
    * changer les strategies ajoutees
    * utilisation : python entrainer prefix_fichier_exemple
    par defaut ajoute au fichier d'exemples sil existe deja
    (extension : .exp pour le fichier exemple)
"""

from soccersimulator import SoccerMatch, show, SoccerTeam,Player,KeyboardStrategy
from strategies import FonceurStrategy, DefenseStrategy, RandomStrategy
import sys

if __name__=="__main__":
    prefix = "tree"
    if len(sys.argv)>1:
        prefix = sys.argv[1]
    strat_key = KeyboardStrategy()
    strat_key.add("a",RandomStrategy())
    strat_key.add("z",FonceurStrategy())
    strat_key.add("e",DefenseStrategy())
    team_noob = SoccerTeam("keyb",[Player("KBs", strat_key),Player("Defense",DefenseStrategy())])
    team_bad = SoccerTeam("foncteam",[Player("Fonceur",FonceurStrategy()),Player("Defense", DefenseStrategy())])
    match = SoccerMatch(team_noob,team_bad,1000)
    show(match)
    strat_key.write(prefix+".exp",True)
开发者ID:jordanupmc,项目名称:soccersimulator,代码行数:24,代码来源:entrainer.py


示例7: __init__

    def __init__(self,comportement,name):
        BaseStrategy.__init__(self,name)
        self.comportement = comportement
    def compute_strategy(self, state, id_team, id_player):
        s_miroir = state
        if id_team==1 :
            Mystate = PlayerDecorator(s_miroir,id_team , id_player)
            return self.comportement(Mystate)
        else :
            s_miroir = miroir_st(state)
            Mystate = PlayerDecorator(s_miroir,id_team , id_player)
            return miroir_sa(self.comportement(Mystate))
    
    

keytest = KeyboardStrategy(fn = "mon_fichier2.exp")

############## strategies principales ############

goalG = Strat(goal, "goal")
attaqueG = Strat(scoreG,"attaquant")
defenseG = Strat(defence,"defenseur")
lateralG = Strat(lateral,"lateral")
pointe = Strat(fullStrike,"pointe")
millieu = Strat(millieu,"millieu")
central = Strat(Dcentral,"dc")
joueur1 = Strat(j1,"j1")

######## strategies standards #############

conserver = Strat(conserver,"conserver")
开发者ID:redxrdx,项目名称:2iO13,代码行数:31,代码来源:strategie.py


示例8: miroir_st

            s_miroir = miroir_st(state)
            Mystate = PlayerStateDecorator(s_miroir,id_team , id_player)
            return miroir_sa(self.comportement(Mystate))


attaquant_fonceur = Strat(attaquant_fonceur, "A")
attaquant_pointe = Strat(attaquant_pointe, "AP")
defenseur_central = Strat(defenseur_central, "DC")
defenseur_gauche = Strat(defenseur_gauche, "DG")
defenseur_droit = Strat(defenseur_droit, "DD")
milieu = Strat(milieu, "M")
milieu_defensif = Strat(milieu_defensif, "MD")


#### Arbres de decisions

tree = cPickle.load(file("./arbre.pkl"))
dic = {"A":attaquant_fonceur,"AP":attaquant_pointe,"DC":defenseur_central, "DG":defenseur_gauche, "DD":defenseur_droit, "M":milieu, "MD":milieu_defensif}
treeStrat = DTreeStrategy(tree,dic,gen_features)

#### Controle avec commandes 

keytest = KeyboardStrategy(fn="arbre")

keytest.add("a", attaquant_fonceur)
keytest.add("z", attaquant_pointe)           
keytest.add("d", defenseur_central)  
keytest.add("e", milieu)  
keytest.add("r", milieu_defensif)

开发者ID:Raouf16,项目名称:2i013,代码行数:29,代码来源:Strat.py


示例9: KeyboardStrategy

from soccersimulator import SoccerMatch, show, SoccerTeam,Player,KeyboardStrategy,KeyboardStrategy
from strategy import MaStrategyFonceur
from strategy import MaStrategyDefensive
from strategy import MaStrategyCampeur
from strategy import MaStrategyUtilitaire
from strategy import MaStrategyGoal


strat = KeyboardStrategy()
strat.add("a",MaStrategyFonceur())
strat.add("z",MaStrategyDefensive())
strat.add("e",MaStrategyUtilitaire())
strat.add("r",MaStrategyGoal())

joueur1 = Player("Alpha", strat)
joueur2 = Player("Dourou", MaStrategyCampeur())
joueur3=  Player("Kiba", MaStrategyGoal())
joueur4=  Player("Soro", MaStrategyFonceur())
joueur5 = Player("Dadan", MaStrategyDefensive())
joueur6 = Player("Manque d'inspi", MaStrategyUtilitaire())

team1 = SoccerTeam("Equipe 1", [joueur1,joueur4])
team2 = SoccerTeam("Equipe 2", [joueur4,joueur5])

	
	
match = SoccerMatch(team1,team2,2000)
show(match)
strat.write("training.exp",True)
开发者ID:Asparodia,项目名称:soccersimulator,代码行数:29,代码来源:training.py


示例10: DTreeStrategy

from decisiontree import *
import cPickle

#tree = cPickle.load(file("./test.pkl"))
#dic = {"Random":RandomStrategy(),"Fonceur":FoncerStrategy(),"Marquer":MarquerStrategy()}
#treeStrat = DTreeStrategy(tree,dic,gen_features)

tree2 = cPickle.load(file("test.pkl"))
dic_exemple = {"Passe":PasseStrategy(),"Random":RandomStrategy(),"Marquer":MarquerStrategy()}
tree2Strat = DTreeStrategy(tree2,dic_exemple,gen_features)

tree3 = cPickle.load(file("goal.pkl"))
dic_exemple = {"Goal":GoalStrategy(),"Defenseur1":Defenseur1Strategy(),"Defenseur2":Defenseur2Strategy()}
tree_goal_strat = DTreeStrategy(tree3,dic_exemple,gen_features)

goal_strat = KeyboardStrategy() 
goal_strat.add("c",GoalStrategy())
#goal_strat.add("v",DefenseStrategy())
goal_strat.add("b",PasseStrategy())

strat2 = KeyboardStrategy() 
strat2.add("j",GoalStrategy())
strat2.add("k",PasseStrategy())
strat2.add("b", DribleStrategy())




team1 = SoccerTeam("team1",[Player("Alexous",strat2)])
team2 = SoccerTeam("team2",[Player("Sam",tree_goal_strat), Player("Slex",RandomStrategy())])
team3 = SoccerTeam("team3",[Player("A", PasseStrategy()), Player("x",RandomStrategy())])
开发者ID:fifa2016,项目名称:projet_foot,代码行数:31,代码来源:team.py


示例11: KeyboardStrategy

from strategy import MaStrategyCampeur
from strategy import MaStrategyGoal
from strategy import MaStrategyUtilitaire
from soccersimulator import DecisionTreeClassifier, SoccerMatch, show, SoccerTeam,Player,KeyboardStrategy

from strategy import DTreeStrategy
#from tree_1v1 import gen_features
#from tree_4v4 import gen_features
from tree_2v2 import gen_features
import cPickle
import os

f=os.path.join(os.path.dirname(os.path.realpath(__file__)),"tree.pkl")


strat = KeyboardStrategy()
strat.add("a",MaStrategyFonceur())
strat.add("z",MaStrategyDefensive())
strat.add("e",MaStrategyUtilitaire())
strat.add("r",MaStrategyGoal())

tree = cPickle.load(file(f))
dic = {"Campeur":MaStrategyCampeur(),"Fonceur":MaStrategyFonceur(),"Defenseur":MaStrategyDefensive(),"Utilitaire":MaStrategyUtilitaire(), "Goal":MaStrategyGoal()}
treeIA = DTreeStrategy(tree,dic,gen_features)

joueur1 = Player("Alpha", strat)
joueur2 = Player("Dourou", MaStrategyCampeur())
joueur3=  Player("Kiba", MaStrategyGoal())
joueur4=  Player("Soro", MaStrategyFonceur())
joueur5 = Player("Dadan", MaStrategyDefensive())
joueur6 = Player("Manque d'inspi", MaStrategyUtilitaire())
开发者ID:Asparodia,项目名称:soccersimulator,代码行数:31,代码来源:test2.py


示例12: len

""" Permet de jouer et d'entrainer une strategie
    * changer les strategies ajoutees
    * utilisation : python entrainer prefix_fichier_exemple
    par defaut ajoute au fichier d'exemples sil existe deja
    (extension : .exp pour le fichier exemple)
"""

from soccersimulator import  SoccerMatch, show, SoccerTeam,Player,KeyboardStrategy
from strategie import *
import sys

if __name__=="__main__":
    prefix = "tree"
    if len(sys.argv)>1:
        prefix = sys.argv[1]    
    keytest = KeyboardStrategy(fn = "mon_fichier")
    keytest.add("d",defenseG)
   # keytest.add("a",attaqueG)
    keytest.add("z",millieu)
    keytest.add("f",finition)
    keytest.add("t",tirer)
    keytest.add("c",conserver)
    keytest.add("g",dribbler)
    keytest.add("q",passer)
    keytest.add("x",position)   
#    keytest.add("c",central)
#    keytest.add("g",posG)
#    keytest.add("d",posGH)
#    keytest.add("c",posGB)   
#    keytest.add("x",degG)
    
开发者ID:redxrdx,项目名称:TMESOLO,代码行数:30,代码来源:entrainer.py


示例13: SousStrat

			return me.alligne_sur_demi_cercle
	else:
		if me.test_peut_shooter:
			return me.shoot_intercepter_contrecarE

		else:
			return me.aller_vers_ball + me.shoot_alea
	
	

FonceurStrat = SousStrat(fonceur_pass)
Gard_shoot_but = SousStrat(gardien_shoot_vers_but)
Gard_shoot_alea = SousStrat(gardien_shoot_alea)
DefStrat = SousStrat(def_mouvement_et_shoot)

keystrat1 = KeyboardStrategy()
keystrat1.add("a", Gard_shoot_alea)
keystrat1.add("b", Gard_shoot_but)

keystrat2= KeyboardStrategy()
keystrat2.add("c", FonceurStrat)
keystrat2.add("d", DefStrat)

milieustrat = KeyboardStrategy()
milieustrat.add("x", FonceurStrat)
milieustrat.add("w", DefStrat)




开发者ID:ad50144124,项目名称:mon_projet,代码行数:26,代码来源:Strategies.py


示例14: __init__

    def __init__(self,comportement,name):
        BaseStrategy.__init__(self,name)
        self.comportement = comportement
    def compute_strategy(self, state, id_team, id_player):
        s_miroir = state
        if id_team==1 :
            Mystate = PlayerStateDecorator(s_miroir,id_team , id_player)
            return self.comportement(Mystate)
        else :
            s_miroir = miroir_st(state)
            Mystate = PlayerStateDecorator(s_miroir,id_team , id_player)
            return miroir_sa(self.comportement(Mystate))
    
    
    
keyatt = KeyboardStrategy()
keygoal = KeyboardStrategy()
keydef = KeyboardStrategy()

    


goal_strat = Strat(goal , "1")
attaque_Strategy = Strat(attaque_pointe,"attaquant")
defense_Strategy = Strat(defenseur1,"def")
milieu = Strat(milieu_centre , "mil")      
milieu_deffa = Strat(milieu_def , "milOf")
test = Strat(test1, "test")
P1_fonceur = Strat(attaquant1 , "foncer")
T2_All = Strat(player_go , "tout")
attaquant_gauche = Strat(attaque_gauche , "7")
开发者ID:lounisAmazigh,项目名称:Projet_SS,代码行数:31,代码来源:Strategie.py


示例15: __init__

    def __init__(self,tree,dic,gen_feat):
        BaseStrategy.__init__(self,"Tree Strategy")
        self.dic = dic
        self.tree = tree
        self.gen_feat= gen_feat
    def compute_strategy(self, state, id_team, id_player):
        label = self.tree.predict([self.gen_feat(state,id_team,id_player)])[0]
        if label not in self.dic:
            print("Erreur : strategie %s non trouve" %(label,))
            return SoccerAction()
        return self.dic[label].compute_strategy(state,id_team,id_player)

dic = {"fonceur":StateLessStrategy(fonceur),"reflexion":StateLessStrategy(reflexion),"defent":StateLessStrategy(defent),"defent_l":StateLessStrategy(defent_l), "shooter":StateLessStrategy(shooter)}
st=DTreeStrategy(tree,dic,gen_features)

strat = KeyboardStrategy() #ou pour une sauvegarde automatique
#KeyboardStrategy(fn="monfichier.exp")
FS = StateLessStrategy(demarque2v1)
RF = StateLessStrategy(reflexion)
PA = StateLessStrategy(passage2v1)
RI = StateLessStrategy(rien)

strat.add("d",FS)
strat.add("q",RF)
strat.add("a",PA)
strat.add("r",RI)

player1 = Player("j1",strat)
player2 = Player("j2",strat)

开发者ID:ad50144124,项目名称:mon_projet,代码行数:29,代码来源:tmesolo.py


示例16: KeyboardStrategy

from soccersimulator import SoccerMatch, SoccerTournament,KeyboardStrategy, Vector2D
from soccersimulator import SoccerTeam, Player, show
from strategy import MaStrategyFonceur
from strategy import MaStrategyDefensive
from strategy import MaStrategyCampeur
from strategy import MaStrategyUtilitaire
from strategy import MaStrategyGoal
from tools import PlayerStateDeco
from soccersimulator import export_graphviz
from soccersimulator import settings, Vector2D,DecisionTreeClassifier
import cPickle

strat = KeyboardStrategy()
strat.add("a",MaStrategyFonceur())
strat.add("z",MaStrategyDefensive())
strat.add("e",MaStrategyUtilitaire())
strat.add("r",MaStrategyGoal())

team_noob = SoccerTeam("myteam",[Player("Thithi", strat),Player("Defense d'acier",MaStrategyDefensive())])
team_bad = SoccerTeam("nemesis",[Player("Fonceur",MaStrategyFonceur()),Player("Defense en carton", MaStrategyDefensive())])


## Fonction de generation de descripteurs
def gen_features(state,id_team,id_player):
	Mystate=PlayerStateDeco(state, id_team, id_player)
	ball_pos = Mystate.ball_pos
	my_pos = Mystate.pos()
	my_goal = Mystate.my_goal
	his_goal = Mystate.his_goal
	#liste_copain=Mystate.get_copain_proche()
	
开发者ID:Asparodia,项目名称:soccersimulator,代码行数:30,代码来源:tree_2v2.py


示例17: Strat

class Strat(BaseStrategy):
    def __init__(self,comportement,name):
        BaseStrategy.__init__(self,name)
        self.comportement = comportement
    def compute_strategy(self, state, id_team, id_player):
        s_miroir = state
        if id_team==1 :
            Mystate = PlayerStateDecorator(s_miroir,id_team , id_player)
            return self.comportement(Mystate)
        else :
            s_miroir = miroir_st(state)
            Mystate = PlayerStateDecorator(s_miroir,id_team , id_player)
            return miroir_sa(self.comportement(Mystate))
    
keytest = KeyboardStrategy()
keytest1 = KeyboardStrategy()

goal_strat = Strat(goal , "1")
attaque_Strategy = Strat(attaque_pointe,"attaquant")
defense_Strategy = Strat(defenseur1,"def")
milieu = Strat(milieu_centre , "mil")      
milieu_attaquant = Strat(milieu_att , "milOf")
test = Strat(test1, "test")
P1_fonceur = Strat(attaquant1 , "att")
T2_All = Strat(player_go , "tout")

keytest.add("d" , defense_Strategy  )
keytest.add("a" , attaque_Strategy  )           
keytest.add("z" , milieu )  
keytest.add("g" , goal_strat  )     
开发者ID:ad50144124,项目名称:mon_projet,代码行数:30,代码来源:Strategie.py


示例18: KeyboardStrategy

import soccersimulator,soccersimulator.settings
from soccersimulator import SoccerTeam, SoccerMatch
from soccersimulator import Player, SoccerTournament
from soccersimulator import BaseStrategy, SoccerAction
from soccersimulator import Vector2D, Player, SoccerTournament
from soccersimulator.settings import *
from strategy import MaStrategyFonceur
from strategy import MaStrategyDefensive
from strategy import MaStrategyCampeur
from strategy import MaStrategyGoal
from strategy import MaStrategyUtilitaire

from tools import PlayerStateDeco
from soccersimulator import KeyboardStrategy

strat = KeyboardStrategy()
strat.add("a",MaStrategyFonceur())
strat.add("z",MaStrategyDefensive())
strat.add("e",MaStrategyCampeur())
strat.add("r",MaStrategyUtilitaire())

joueur1 = Player("Alpha", strat)
joueur2 = Player("Dourou", MaStrategyCampeur())
joueur3=  Player("Kiba", MaStrategyGoal())
joueur4=  Player("Soro", MaStrategyFonceur())
joueur5 = Player("Dadan", MaStrategyDefensive())
joueur6 = Player("Manque d'inspi", MaStrategyUtilitaire())

team1 = SoccerTeam("Equipe 1", [joueur1,joueur3])
team2 = SoccerTeam("Equipe 2", [joueur4,joueur5])
team4 = SoccerTeam("Equipe 4", [joueur6,joueur2,joueur3,joueur5])
开发者ID:ad50144124,项目名称:mon_projet,代码行数:31,代码来源:test.py


示例19: len

""" Permet de jouer et d'entrainer une strategie
    * changer les strategies ajoutees
    * utilisation : python entrainer prefix_fichier_exemple
    par defaut ajoute au fichier d'exemples sil existe deja
    (extension : .exp pour le fichier exemple)
"""

from soccersimulator import SoccerMatch, show, SoccerTeam,Player,KeyboardStrategy
from projet import *
import sys

if __name__=="__main__":
    prefix = "train"
    if len(sys.argv)>1:
        prefix = sys.argv[1]
    strat_key = KeyboardStrategy()
    strat_key.add("f",fonceStrat)
    strat_key.add("g",gardien)
    strat_key.add("a",attaque)
    strat_key.add("d",defense)
    team_noob = SoccerTeam("keyb",[Player("KBs", strat_key)])
    team_bad = SoccerTeam("foncteam",[Player("toto",j_solo)])
    match = SoccerMatch(team_noob,team_bad,1000)
    show(match)
    strat_key.write(prefix+".exp",True)
开发者ID:Kabegami,项目名称:Projet-foot,代码行数:25,代码来源:entrainer.py


示例20: compute_strategy

    def compute_strategy(self,state,idteam,idplayer): #ou faire miroir ici
	self.state = state
     
        action,self.name=self.strat(MyState(self.state,idteam,idplayer))
	#print action
        #if(idteam!=1):
	   #action= miroir_action(action)

        #print action
        return action

QDribbut= SStrat(qdribler_vers_but)
QDriblerzone = SStrat(qdribler_vers_zone)
QDegager = SStrat(qdegager)
QShootBas = SStrat(qshooter_bas)
QShootHaut= SStrat(qshooter_haut)
QShooterMalin= SStrat(qshooter_malin)
QShootFort= SStrat(qshooter_fort)
QDegager = SStrat(qdegager)

KBS=KeyboardStrategy()
KBS.add("y",QShootHaut)
KBS.add("h",QShootBas)
KBS.add("b",QShootFort)
KBS.add("d",QDribbut)
KBS.add("u",QShooterMalin)
KBS.add("e",QDegager)


开发者ID:3408247,项目名称:MonProj,代码行数:27,代码来源:newqkbs.py



注:本文中的soccersimulator.KeyboardStrategy类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python social._函数代码示例发布时间:2022-05-27
下一篇:
Python soccersimulator.BaseStrategy类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap