Back to projects
Pig Game
A simple dice game built while learning JavaScript fundamentals.
Personal
Personal
2021
1 min read
Live site: https://alfariiizi.github.io/pig-game/
Repository: https://github.com/alfariiizi/pig-game

Pig Game
# Overview
Pig Game is a two-player dice game where players take turns rolling and holding points.
# Business Context
This was a personal learning project based on a JavaScript course exercise.
# My Role
I implemented the browser game logic and UI behavior.
# Key Capabilities
- Dice roll handling
- Turn switching
- Temporary and held score states
- Win condition handling
- Game reset flow
# Technical Direction
The project was built with HTML, CSS, and JavaScript. The focus was DOM manipulation, event handling, and small state-machine-like UI behavior.
# Outcome / Impact
The project helped me practice interactive browser logic early in my frontend learning path.
# Gallery
- Screenshot placeholder: game board
- Screenshot placeholder: active player state
- Screenshot placeholder: winner state
Tags: