Skip to content

Commit

Permalink
Merge pull request #29 from AP2020Fall/Fatemeh
Browse files Browse the repository at this point in the history
Phase 1;
  • Loading branch information
fatemeh-mir authored Dec 17, 2020
2 parents 9a75860 + 47ade0a commit d0e120d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
10 changes: 8 additions & 2 deletions src/plato/controller/DotsAndBoxesController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import plato.model.Player;
import plato.view.DotsAndBoxesView;

import java.util.ArrayList;
import java.util.Scanner;


Expand All @@ -13,8 +14,9 @@ public class DotsAndBoxesController extends DotsAndBoxes {
static final int RIGHT = 0;
static final int BOTTOM = 1;
public static int numberofplayedgame=0;
public static int turn;
boolean[][] box;
int turn;

boolean[][] rightline;
boolean[][] bottomline;

Expand Down Expand Up @@ -123,7 +125,11 @@ public void saveInformation(){
public void availableLines(){

}
public void players(Player player1, Player player2){
ArrayList<Player> players = new ArrayList<>();
public ArrayList<Player> players(Player player1, Player player2){
players.add(player1);
players.add(player2);
return players;

}
public void timeToDrawLine(){
Expand Down
8 changes: 4 additions & 4 deletions src/plato/view/DotsAndBoxesView.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ public class DotsAndBoxesView extends GameView {


public void showWhoseTurn(Player player1, Player player2){
if(DotsAndBoxesController.turn == 1 )
System.out.println("It's" + player1 + "Turn");
if (DotsAndBoxesController.turn == 2)
System.out.println("It's" + player2 + "Turn");

}
public void showTable(){

}
//Dots
public void showAvailableLines(){


}
//Line
public void showDrawnLines(){

Expand Down
4 changes: 2 additions & 2 deletions src/plato/view/GameView.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void showPlayedCount(Game game) {

}

public String showPoints(Game game) {
return null;
public void showPoints(Game game) {

}
}

0 comments on commit d0e120d

Please sign in to comment.