librejack

Blackjack clone written in java
git clone https://github.com/michaelneuper/librejack.git
README | Files | Log | Refs | LICENSE

commit 2adbc48a64bc6263e8c75548716da3325c8587f6
parent 370c8d8bb4f71692f796f9ba8124f7e303339fd1
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date:   Sun, 22 May 2022 17:37:19 +0200

change Card.java

Diffstat:
Adocs/specification/main.tex | 94+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/Controller/Controller.java | 2+-
Msrc/Model/Card.java | 37++++++++++++++++++++++++++++++++++++-
Msrc/Model/Dealer.java | 2+-
Msrc/Model/Deck.java | 5++++-
Msrc/Model/Player.java | 5++---
Msrc/View/Main.java | 2+-
Asrc/model/Person.java | 9+++++++++
8 files changed, 148 insertions(+), 8 deletions(-)

diff --git a/docs/specification/main.tex b/docs/specification/main.tex @@ -0,0 +1,93 @@ +\documentclass[12pt]{article} + +% Language setting +% Replace `english' with e.g. `spanish' to change the document language +\usepackage[english]{babel} + +% Set page size and margins +% Replace `letterpaper' with`a4paper' for UK/EU standard size +\usepackage[a4paper,top=2cm,bottom=2cm,left=2cm,right=2cm,marginparwidth=1.75cm]{geometry} + +% Useful packages +\usepackage{amsmath} +\usepackage{titlesec} +\usepackage{titlecaps} +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage[utf8x]{inputenc} +\usepackage[colorlinks=true, allcolors=blue]{hyperref} + +% Format titles +\titleformat{\section} +{\bfseries\centering\large} +{§\thesection} +{1em} +{} +\titleformat{\subsection} +{\bfseries\centering} +{\thesubsection} +{1em} +{} + +% Set footer +\pagestyle{fancy} +\fancyhf{} +\fancyhead[LE,RO]{} +\fancyhead[RE,LO]{\leftmark} +\fancyfoot[CE,CO]{} +\fancyfoot[LE,RO]{Bladsy \thepage} + +\title{ + \begin{huge} + Specification Document + \end{huge} +\author{Michael Neuper}} +\date{} +\pagebreak + +\begin{document} + +\begin{titlepage} + \centering + \vspace*{\fill} + + \vspace*{0.5cm} + + \Huge\bfseries + librejack + + \LARGE Specification Document + + \vspace*{0.5cm} + + \Large Michael Neuper + + \vspace{6cm} + + \begin{quote} + \large + + \textbf{\textit{Libre}} /\char{27}librə/ in English is adopted from the various Romance languages, ultimately descending from the Latin word līber; its origin is closely related to liberty. It denotes `the state of being free', as in `liberty' or `having freedom' + \end{quote} + + \vspace*{\fill} +\end{titlepage} + +\tableofcontents +\pagebreak + +\section{Summary} + +\section{Motivation} + +\section{Specifications of Program Function} + +\section{Specifications of User Interface} + +\section{Specification of Help} + +\section{Specifications of Data Storage} + +\section{Hardware and Software requirements} + +\end{document} +\ No newline at end of file diff --git a/src/Controller/Controller.java b/src/Controller/Controller.java @@ -1,4 +1,4 @@ -package Controller; +package controller; /** * diff --git a/src/Model/Card.java b/src/Model/Card.java @@ -5,5 +5,40 @@ package model; * @author michael */ public class Card { - // TODO + + enum Suit { + CLUBS, + DIAMONDS, + HEARTS, + SPADES, + } + + enum Rank { + TWO, + THREE, + FOUR, + FIVE, + SIX, + SEVEN, + EIGHT, + NINE, + TEN, + JACK, + QUEEN, + KING, + ACE, + } + + Suit suit; + Rank rank; + + /** + * Card constructor + * @param suit Card suit + * @param rank Card rank + */ + public Card(Suit suit, Rank rank) { + this.suit = suit; + this.rank = rank; + } } \ No newline at end of file diff --git a/src/Model/Dealer.java b/src/Model/Dealer.java @@ -4,6 +4,6 @@ package model; * * @author michael */ -public class Dealer { +public class Dealer extends Person { // TODO } \ No newline at end of file diff --git a/src/Model/Deck.java b/src/Model/Deck.java @@ -1,9 +1,12 @@ package model; +import java.util.ArrayList; + /** * * @author michael */ public class Deck { - // TODO + + ArrayList<Card> deck = new ArrayList<>(); } \ No newline at end of file diff --git a/src/Model/Player.java b/src/Model/Player.java @@ -1,10 +1,9 @@ -package Model; +package model; /** * * @author michael */ -public class Player { +public class Player extends Person { // TODO - } diff --git a/src/View/Main.java b/src/View/Main.java @@ -1,4 +1,4 @@ -package View; +package view; public class Main { public static void main(String[] args) { diff --git a/src/model/Person.java b/src/model/Person.java @@ -0,0 +1,9 @@ +package model; + +/** + * + * @author michael + */ +public abstract class Person { + // TODO +}