Skip to content

Commit

Permalink
Tarea 4 (#12)
Browse files Browse the repository at this point in the history
* Delete src directory

* partire desde la pauta, mi tarea 1 estaba fea

* test files added to project

* name added to tests

* testing equals and hashcode

* basic tests for player

* implemented equals canequal and hashcode

* implemented past functionalities from player

* new files created, for board

* test created for board and trait zone made

* cleaning before checkout

* fixed interfaces before new branch

* new branch?

* new branch?

* new branch with Game added

* putCard declaration

* added add to zones

* hashcode for zones

* canEqual and equals for zones

* pasted setting for tests for zones

* fixed cards with null value in tests for Equal

* implemented add for Player.play()

* Game error, trying to fix

* game

* now game handles adding cards to board

* fix local error in intellij, regarding game

* 46%

* controller created

* controller first draft, fixed notequals in player

* 71%

* made board and hand for the vista-controller

* game plays, just need to implement effects

* tests for zones

* test expanse

* Update README.md

* tests for player, 59% of lines covered

* tests for game, 68% of lines covered

* new Traits

* traits

* minor changes

* deleted traits for effects

* effects implemented suspiciously

* finished game, no tests

* update: partida.nextRound() missing

* board print improved

* fixed WeatherEffect

* game functioning allegedly

* 58% of lines covered

* 60% of lines covered

* 64% of lines covered, commented out Exception s

* 64% of lines covered?

* 68% of lines covered, cards are 100% ready

* 72% of lines covered

* README.md

* New name: gwemtg. Updated README.md

* (desc 1) Update README.md

* Update README.md?

* Update README.md

* comments for structure

* created statestest

* polished README.md

* added spacing

* todo.txt

* made classes for effects

* new name for vistacintroller, todo: split

* added files for state pattern

* new test file

* making documentation for refuerzo moral and vinculo estrecho

* mtgification of close combat cards

* stateofgame

* advancments in the state abstraction

* play round part 1

* substractgems

* mega tests????

* todo: states test

* this.changeState

* todo: for deadlineday

* mtgification part 2: electric boogaloo

* Update README.md: mana added to card description

* Update README.md: mtg and wotc added to context

* Update README.md

* README.md: update in convention

* changes by adding a plug in

* atempt number 1 to add mana to the game

* first fix for tests with mana added

* markdown

* README.md: minor changes

* try and fail: update tests for mana

* Detached6 into tarea-4 (#11)

* switched to intellij: now i have a corrector

* more mistakes corrected: in states and StateOfGame

* more corrections in Estado and StateOfGame

* killed deprecated parenthesis

* added stuff to state package

* last changes before mega super refactor

* last last changes before mega super refactor: this time in the correct branch

* mega super refactor: from gwent to gwemtg

* cleaning after super mega refactor

* setting files from ide

* StateOfGame is the last red file

* despair

* despair pt2: looking in .sbt file

* despair pt3: looking in .sbt file

* despair pt3: commented things in StateOfGame and fixed other issues, then uncommented

* despair pt5: renamed methods, unsuccessfully

* despair done by now: had to use state instead of Estado

* added mana to beforeeach in tests

* quick fixes to tests

* last fixes to tests before expanding

* effects D:

* effects sum progress

* effects done, now gotta use a composite??

* 52% of lines tested

* :C didnt undestood the composite patter in the context of effects and cards

* 54% of lines covered

* 58% of lines covered

* 86% of lines covered, after killing VistaController.scala

* 76% of lines covered?? added Estado, but lines decreaced

* ??? sbt sadness

* 84%

* last commit: it covers 87% of lines, yet many documentation lines are counted as not covered
  • Loading branch information
hugodiazroa authored Aug 8, 2023
1 parent c7902b4 commit d6f4b6e
Show file tree
Hide file tree
Showing 74 changed files with 4,867 additions and 1,016 deletions.
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/modules/gwent.iml → .idea/modules/gwemtg.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/scala_compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .metals/metals.lock.db
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#FileLock
#Mon Aug 07 16:41:30 UTC 2023
server=localhost\:46063
hostName=localhost
method=file
id=189d0e007da4a84b4ae8ac187d80020c33c455dcbba
Binary file added .metals/metals.mv.db
Binary file not shown.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.watcherExclude": {
"**/target": true
}
}
11 changes: 1 addition & 10 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Attribution 4.0 International
# Attribution 4.0 International

=======================================================================

Expand Down Expand Up @@ -65,7 +65,6 @@ these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.


Section 1 -- Definitions.

a. Adapted Material means material subject to Copyright and Similar
Expand Down Expand Up @@ -129,7 +128,6 @@ Section 1 -- Definitions.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.


Section 2 -- Scope.

a. License grant.
Expand Down Expand Up @@ -206,7 +204,6 @@ Section 2 -- Scope.
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.


Section 3 -- License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the
Expand Down Expand Up @@ -258,7 +255,6 @@ following conditions.
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.


Section 4 -- Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that
Expand All @@ -280,7 +276,6 @@ For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.


Section 5 -- Disclaimer of Warranties and Limitation of Liability.

a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
Expand Down Expand Up @@ -309,7 +304,6 @@ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
possible, most closely approximates an absolute disclaimer and
waiver of all liability.


Section 6 -- Term and Termination.

a. This Public License applies for the term of the Copyright and
Expand Down Expand Up @@ -338,7 +332,6 @@ Section 6 -- Term and Termination.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.


Section 7 -- Other Terms and Conditions.

a. The Licensor shall not be bound by any additional or different
Expand All @@ -348,7 +341,6 @@ Section 7 -- Other Terms and Conditions.
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.


Section 8 -- Interpretation.

a. For the avoidance of doubt, this Public License does not, and
Expand All @@ -372,7 +364,6 @@ Section 8 -- Interpretation.
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.


=======================================================================

Creative Commons is not a party to its public
Expand Down
61 changes: 52 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,59 @@
# Gwen't
# GweMTG

![http://creativecommons.org/licenses/by/4.0/](https://i.creativecommons.org/l/by/4.0/88x31.png)
## By

This work is licensed under a
[Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)
HD (github.com/hugodiazroa)

## Description

Gwemt is a trading card game based upon Gwen from the Witcher series with "Magic the Gathering" themed cards. The game is played over a best-of-three series of rounds, as players unleash their hand by slinging spells and diverse units with special abilities.
There are four types of cards:

• Climate cards

• Close combat unit cards

• Ranged unit cards

• Siege unit cards

The game is played by two players. In this iteration of the development of the game the only implementaion of the code we will only cover the case of a match between a human and a robot ~todo: robot v robot~

Under this rules, the human player is the one who starts the game and the computer player is the one who responds to the human player's actions. The game is played in turns, where each player can play a card or pass. The first round players draw 10 cards, then 3 cards at the beginning of each round. ~The player who starts is always the human.~

A round ends when both players pass. The player who wins the round is the one who has the highest power. If both players have the same power, the round ends in a draw. The loser of a round starts the next round and loses a gem.

If a player has zero or less gems, they lose the game. The winner is the one to finish a round being the only one to have not lost. In case of a draw, both players lose a gem and the player who started the previuos round starts the next again. In case, after a draw, all players have lost, the game ends in a draw.

The game is played over a board which is divided into seven rows,

Context
-------
• A shared row for weather cards

• The melee row, for each player

• The ranged row, for each player

• The siege row, for each player

Each player has a deck of cards which contains 25 cards. Each card has a name a converted mana cost and a description ~todo: change description to oracle "pattern"??~. Unit cards also have power.

## How to run the game

~The game runs on the console after excecuting the Controller object. The game is played by entering the number of the card you want to play. The game ends when one of the players wins two rounds and then the program excecuting ends.~

## State diagram

![State diagram](https://github.com/dcc-cc3002/gwemtg/assets/16340209/ac5272fb-d807-4a98-af4e-5dff1f074e1c)

## Context

This project's goal is to create a (simplified) clone of the
[_Gwent_](https://www.playgwent.com/en)card game developed by [_CD PROJEKT RED_](https://cdprojektred.com/en/)
[Gwent](https://www.playgwent.com/en/) card game developed by [_CD PROJEKT RED_](https://cdprojektred.com/en/) with some influence fron the original trading card game, Magic: the Gathering developed by [Wizards of the Coast](https://company.wizards.com/en)

---
## License

**The rest of the documentation is left for the users of this template to complete**
![http://creative![Creative Commons logo]()
commons.org/licenses/by/4.0/](https://i.creativecommons.org/l/by/4.0/88x31.png)

This work is licensed under a
[Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ ThisBuild / scalaVersion := "3.2.2"

lazy val root = (project in file("."))
.settings(
name := "gwent",
idePackagePrefix := Some("cl.uchile.dcc")
name := "gwemtg",
idePackagePrefix := Some("hugodiazroa")
)


libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
Loading

0 comments on commit d6f4b6e

Please sign in to comment.