Skip to content

Commit

Permalink
A readme
Browse files Browse the repository at this point in the history
  • Loading branch information
filipopo committed Mar 31, 2024
1 parent 9c21230 commit ea06c22
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CatanCrainer

Welcome, feel free to check out this website on github pages

To get it running locally you can run the following commands
```
npm install
npm run dev
```

To get production ready files it should be built with `npm run build`

This project is based on the `preact + TypeScript + Vite` template
```
npm create vite@latest CatanTrainer -- --template preact-ts
```
4 changes: 4 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ export function App() {

return (
<>
Point A<br/>
<Input variable={pointA} setVariable={setPointA}
allowedValues={['0 0', '2 0', '4 0', '4 2', '2 4', '0 2']} />

Desert index<br/>
<Input variable={desert} setVariable={setDesert} />

<CatanBoard pointA={pointA} desert={desert} />
</>
)
Expand Down
6 changes: 3 additions & 3 deletions src/components/catan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function CatanBoard({pointA, desert, boardSize = 5}: CatanProps) {
Top buildable spots:
{catan.buildSpots.map((row, num) => (
<div key={`build_${num}`}>
{row.join(' - ')}
<br/>
</div>
{row.join(' - ')}
<br/>
</div>
))}
</div>
)
Expand Down

0 comments on commit ea06c22

Please sign in to comment.