Western Double-Six Domino

Client: Course Project

Role: Developer

Tech Stack: Go

Western Double-Six Domino

Project Overview

The Solitaire Game: Western Double-Six Domino is a group project developed as part of the Algorithm Programming course at Telkom University, in collaboration with I Nyoman Manutama Surya Jagadhita. This game implements the traditional double-six domino gameplay using modular programming design principles. The project consists of well-defined subprograms to manage various game functionalities, including tile management, score tracking, and winner determination. Each tile in the game is represented by an object containing two sections, with a total of 28 tiles. The game is designed to enhance algorithmic thinking by employing various search and sorting algorithms, including sequential and binary search, as well as Selection Sort and Insertion Sort for data organization. We used Go as the programming language of choice to make this game.

Problem Statement

The Western double-six domino game poses several challenges, such as ensuring fair gameplay through proper tile management, efficient tracking of player scores, and accurate determination of game winners based on specific rules. Additionally, the program must adhere to modular design principles, utilizing subprograms and proper data structures while implementing key algorithms to enhance game performance and functionality. This project aims to create an engaging and interactive game experience while reinforcing concepts of algorithm design and modular programming.

How It Is Done

The project is structured to follow modular programming practices, breaking down functionalities into subprograms with clear parameters and specifications. The domino set is scrambled using the random() function from the math/rand package, ensuring that the gameplay is unpredictable. The program employs arrays and custom-defined data types to manage tile states and player scores. Players can interact with the game by selecting and replacing tiles, restarting the game, and tracking scores. The program implements both sequential and binary search algorithms for locating tiles and includes Selection Sort and Insertion Sort to organize tile values for efficient gameplay. Additionally, the application tracks game statistics, allowing players to view their highest scores and overall performance, making it a comprehensive and engaging domino experience.