-
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from enkeefe/master
Adding a Turtle Pet
- Loading branch information
Showing
18 changed files
with
138 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
import { PetColor } from '../../common/types'; | ||
import { BasePetType } from '../basepettype'; | ||
import { States } from '../states'; | ||
|
||
export class Turtle extends BasePetType { | ||
label = 'turtle'; | ||
static possibleColors = [PetColor.green, PetColor.orange]; | ||
sequence = { | ||
startingState: States.sitIdle, | ||
sequenceStates: [ | ||
{ | ||
state: States.sitIdle, | ||
possibleNextStates: [ | ||
States.walkRight, | ||
States.runRight, | ||
States.lie, | ||
], | ||
}, | ||
{ | ||
state: States.lie, | ||
possibleNextStates: [States.walkRight, States.runRight], | ||
}, | ||
{ | ||
state: States.walkRight, | ||
possibleNextStates: [States.walkLeft, States.runLeft], | ||
}, | ||
{ | ||
state: States.runRight, | ||
possibleNextStates: [States.walkLeft, States.runLeft], | ||
}, | ||
{ | ||
state: States.walkLeft, | ||
possibleNextStates: [ | ||
States.sitIdle, | ||
States.lie, | ||
States.walkRight, | ||
States.runRight, | ||
], | ||
}, | ||
{ | ||
state: States.runLeft, | ||
possibleNextStates: [ | ||
States.sitIdle, | ||
States.lie, | ||
States.walkRight, | ||
States.runRight, | ||
], | ||
}, | ||
{ | ||
state: States.chase, | ||
possibleNextStates: [States.idleWithBall], | ||
}, | ||
{ | ||
state: States.idleWithBall, | ||
possibleNextStates: [ | ||
States.walkRight, | ||
States.walkLeft, | ||
States.runLeft, | ||
States.runRight, | ||
], | ||
}, | ||
], | ||
}; | ||
get emoji(): string { | ||
return '🐢'; | ||
} | ||
get hello(): string { | ||
return ` Slow and steady wins the race!`; | ||
} | ||
} | ||
|
||
export const TURTLE_NAMES: ReadonlyArray<string> = [ | ||
'Shelldon', | ||
'Shelly', | ||
'Shelley', | ||
'Sheldon', | ||
'Tortuga', | ||
'Tortellini', | ||
'Charlie', | ||
'Ross', | ||
'Squirt', | ||
'Crush', | ||
'Squirtle', | ||
'Koopa', | ||
'Bowser', | ||
'Bowsette', | ||
'Franklin', | ||
'Koopa Troopa', | ||
'Blastoise', | ||
'Cecil', | ||
'Wartortle', | ||
'Donatello', | ||
'Michaelangelo', | ||
'Leonardo', | ||
'Leo', | ||
'Donny', | ||
'Mikey', | ||
'Raphael', | ||
'Chelone', | ||
'Emily', | ||
'Joseph', | ||
'Anne', | ||
'Zagreus', | ||
'Kratos', | ||
'Atreus', | ||
'Loki', | ||
'Freya', | ||
'Brevity', | ||
'Arthur', | ||
'Doyle', | ||
'Sherlock', | ||
'Charli', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters