-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
interface Character { | ||
name: string; | ||
hp: number; | ||
} | ||
|
||
export const CharacterSheet = ({ name, hp }: Character) => { | ||
return ( | ||
<div className="p-1 border-2 border-white rounded-lg"> | ||
<p className="uppercase font-bold">{name}</p> | ||
<p className="uppercase font-bold">hp</p> | ||
<p className="text-right">{hp}</p> | ||
</div> | ||
); | ||
}; |
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,11 @@ | ||
export const PlayerMenu = () => { | ||
return ( | ||
<div className="flex flex-col justify-center flex-wrap font-bold text-lg uppercase p-4 h-full"> | ||
<p>Fight</p> | ||
<p>Magic</p> | ||
<p>Drink</p> | ||
<p>Item</p> | ||
<p>Run</p> | ||
</div> | ||
); | ||
}; |
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,23 @@ | ||
interface CharacterClass { | ||
name: string; | ||
hp: number; | ||
img: string; | ||
attack: number; | ||
critChance: number; | ||
} | ||
class CharacterGenerator implements CharacterClass { | ||
constructor( | ||
public name: string, | ||
public hp: number, | ||
public img: string, | ||
public attack: number, | ||
public critChance: number | ||
) {} | ||
} | ||
|
||
export const characterList = [ | ||
new CharacterGenerator('AAAA', 30, '/images/AAAA.png', 10, 0.2), | ||
new CharacterGenerator('BBBB', 25, '/images/BBBB.png', 12, 0.3), | ||
new CharacterGenerator('CCCC', 28, '/images/CCCC.png', 8, 0.25), | ||
new CharacterGenerator('DDDD', 33, '/images/DDDD.png', 15, 0.15), | ||
]; |