Skip to content

An open-source student project at HTWG Konstanz for the class Software Engineering to create a game in scala 3. Using fuctional programming as a paradigm for software development and agility by testing code.

License

Notifications You must be signed in to change notification settings

AlexTemirbulatow/de.htwg.se.DotsAndBoxes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dots And Boxes

A project at HTWG Konstanz for the class Software Engineering to create a game 'Dots and Boxes' in scala.
Using fuctional programming as a paradigm for software development and agility by testing code.

Click here to view the project presentation

Scala CI Coverage Status GitHub contributors

GitHub watchers

Usage

You can compile code with sbt compile, run it with sbt run, and sbt console will start a Scala 3 REPL.

You can run tests with sbt clean coverage test and get a coverage report with sbt coverageReport

To run the TUI properly, the terminal must be set to chcp 65001 and Unicode UTF-8 must be enabled.

RulesGUI
You move by taking a horizontal or vertical line
between two dots. When you place the last line that
forms a box, the box and its content are yours. The
players move in turn, but whenever a player takes a
box, they must move again. One box is one point.

The game ends when all boxes have been taken.

The player with the highest score wins.
It's a tie if two players got the same highest score.

The UIs support 2-4 players, a customizable field
size and a GUI only light and dark mode.

UsageTUI
The field consists of two separate 2D vectors:
  • The first vector represents all horizontal lines
  • The second vector represents all vertical lines
Access in a move:
  • The horizontal vector can be accessed with (1)
  • The vertical vector can be accessed with (2)
  • Lines within a vector are accessed with
    X and Y coordinates, starting at (0,0)
Therefore, a move to occupy a line consists of:
<Line><X><Y>

You can type (q) to quit, (z) to undo, (y) to redo,
(s) to save the current game state and (l) to load it.

Contributors

AlexTemirbulatowYazanski

LICENSE

GitHub

Copyright (c) 2023 Alexander Temirbulatow and Yazan Alkhatib

About

An open-source student project at HTWG Konstanz for the class Software Engineering to create a game in scala 3. Using fuctional programming as a paradigm for software development and agility by testing code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published