parent
deb3e59cae
commit
23e4b24d5b
@ -0,0 +1,13 @@
|
|||||||
|
import PersonNetwork from "./PersonsNetwork";
|
||||||
|
import Player from "./Player";
|
||||||
|
|
||||||
|
abstract class Bot extends Player{
|
||||||
|
|
||||||
|
constructor( id: string, name: string){
|
||||||
|
super(id, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract playRound(personNetwork : PersonNetwork, players: Player): [number, boolean]
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Bot
|
@ -0,0 +1,28 @@
|
|||||||
|
import Bot from "./Bot";
|
||||||
|
import Indice from "./Indices/Indice";
|
||||||
|
import PersonNetwork from "./PersonsNetwork";
|
||||||
|
import Player from "./Player";
|
||||||
|
|
||||||
|
class EasyBot extends Bot{
|
||||||
|
|
||||||
|
public indice: Indice | undefined
|
||||||
|
|
||||||
|
constructor(id: string, name: string){
|
||||||
|
super(id, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
toJson() {
|
||||||
|
return {
|
||||||
|
type: "EasyBot",
|
||||||
|
id: this.id,
|
||||||
|
name: this.name,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
playRound(personNetwork: PersonNetwork, players: Player): [number, boolean] {
|
||||||
|
return [1, false]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EasyBot
|
@ -0,0 +1,18 @@
|
|||||||
|
import Player from "./Player";
|
||||||
|
|
||||||
|
class Human extends Player{
|
||||||
|
|
||||||
|
constructor(id: string, name: string){
|
||||||
|
super(id, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
toJson() {
|
||||||
|
return {
|
||||||
|
type: "Human",
|
||||||
|
id: this.id,
|
||||||
|
name: this.name,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Human
|
Loading…
Reference in new issue