-
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
14 changed files
with
187 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
Words taken from https://websites.umich.edu/~jlawler/wordlist.html | ||
|
||
## TODO | ||
|
||
- Add home page | ||
- Add animations | ||
- Add multiplayer (....🐸 hopefully) |
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
This file was deleted.
Oops, something went wrong.
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,54 @@ | ||
<script lang="ts"> | ||
import type { Player } from '$lib/data/Player'; | ||
import type { PlayerScore } from '$lib/data/PlayerScore'; | ||
import { createEventDispatcher } from 'svelte'; | ||
export let player: Player; | ||
export let myTurn: boolean; | ||
export let playerScore: PlayerScore; | ||
const dispatch = createEventDispatcher<{ onPlayerClick: void }>(); | ||
</script> | ||
|
||
<button | ||
class="container global-subcontainer-bg" | ||
title={`Click to show detailed score of ${player.name}`} | ||
style="--color:{player.color}" | ||
data-active={myTurn} | ||
on:click={() => dispatch('onPlayerClick')} | ||
> | ||
<div class="color" /> | ||
<span class="name">{player.name}</span> | ||
<span class="score">{playerScore.score}</span> | ||
</button> | ||
|
||
<style lang="postcss"> | ||
[data-active='true'] { | ||
@apply border-2; | ||
border-color: var(--color); | ||
} | ||
.container { | ||
@apply flex justify-start items-center gap-1; | ||
@apply flex-1 large:basis-full rounded-lg w-fit; | ||
@apply cursor-pointer large:p-2 p-0.5; | ||
} | ||
.color { | ||
@apply h-4 w-4; | ||
@apply rounded-xl; | ||
background-color: var(--color); | ||
} | ||
.name { | ||
@apply text-sm large:text-base; | ||
@apply flex-1 text-start; | ||
@apply large:px-2; | ||
} | ||
.score { | ||
@apply py-0.5 px-1 rounded; | ||
@apply text-sm large:text-base; | ||
background-color: var(--color); | ||
} | ||
</style> |
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 @@ | ||
fff |
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 @@ | ||
<script lang="ts"> | ||
import { createEventDispatcher } from 'svelte'; | ||
import Preference from './Preference.svelte'; | ||
export let dialog: HTMLDialogElement; | ||
const dispatch = createEventDispatcher<{}>(); | ||
</script> | ||
|
||
<dialog bind:this={dialog}> | ||
<h2>Preference</h2> | ||
<Preference /> | ||
</dialog> | ||
|
||
<!-- https://svelte.dev/repl/885653f873284f7880490dcdd1200238?version=3.48.0 --> |
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,8 @@ | ||
import type { BoardSize, PlayerCount } from './Board'; | ||
|
||
export type GameParameter = { | ||
board: BoardSize; | ||
players: PlayerCount; | ||
names?: Array<string>; | ||
colors?: Array<string>; | ||
}; |
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
Oops, something went wrong.