Harun Kestendžić

Smaller projects

Pig game

A two-player dice game: roll to build up points, hold to bank them.

  • A player rolls a die and adds it to the current score. Rolling a 1 loses the current score and passes the turn.
  • Hold adds the current score to the total and passes the turn. The first player to reach 100 wins.
  • A way to practise changing the page from JavaScript and keeping the game state in variables.

These follow the course material, so they show what I learned, not original designs.

Type
Web
What it is
Web, learning project
Built with
JavaScript, HTML, CSS
A full game: two players roll and hold until one reaches 100.
The Pig game after Player 2 has won with 101 points.
The winner's side turns dark.