Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my version of code based on UML for code review #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/me/ermakov/tictactoe/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package me.ermakov.tictactoe;

import me.ermakov.tictactoe.controller.GameController;

/**
* Created by user on 08.02.2015.
*/
public class Main {

public static void main(String[] args) {

final GameController game;

}

}
32 changes: 32 additions & 0 deletions src/me/ermakov/tictactoe/controller/GameController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package me.ermakov.tictactoe.controller;

import me.ermakov.tictactoe.model.Player;
import me.ermakov.tictactoe.model.Board;

/**
* Created by user on 06.02.2015.
*/
public class GameController {

private Player[] players;
private final String gameName;
private Board board;

public GameController(final String gameName, final Board board) {
this.gameName = gameName;
this.board = board;
}

public String getGameName() {
return gameName;
}

public boolean move(int x, int y) {
return false;
}

public Player currentPlayer() {
return null;
}

}
18 changes: 18 additions & 0 deletions src/me/ermakov/tictactoe/model/Board.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package me.ermakov.tictactoe.model;

/**
* Created by user on 06.02.2015.
*/
public class Board {

private Figure figure11;
private Figure figure12;
private Figure figure13;
private Figure figure21;
private Figure figure22;
private Figure figure23;
private Figure figure31;
private Figure figure32;
private Figure figure33;

}
18 changes: 18 additions & 0 deletions src/me/ermakov/tictactoe/model/Figure.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package me.ermakov.tictactoe.model;

/**
* Created by user on 06.02.2015.
*/
public class Figure {

private final String figure;

public Figure(String figureName) {
this.figure = figureName;
}

public String getFigure() {
return figure;
}

}
24 changes: 24 additions & 0 deletions src/me/ermakov/tictactoe/model/Player.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package me.ermakov.tictactoe.model;

/**
* Created by user on 06.02.2015.
*/
public class Player {

private final Figure figure;
private final String name;

public Player(final String name, final Figure figure) {
this.name = name;
this.figure = figure;
}

public String getName() {
return name;
}

public Figure getFigure() {
return figure;
}

}
13 changes: 13 additions & 0 deletions src/me/ermakov/tictactoe/view/AdvConsoleView.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package me.ermakov.tictactoe.view;

/**
* Created by user on 06.02.2015.
*/
public class AdvConsoleView extends ConsoleView {

@Override
public void showGameName() {

}

}
20 changes: 20 additions & 0 deletions src/me/ermakov/tictactoe/view/ConsoleView.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package me.ermakov.tictactoe.view;

import me.ermakov.tictactoe.controller.GameController;

/**
* Created by user on 06.02.2015.
*/
public class ConsoleView {

private GameController gameController;

public void showGameName() {

}

public void showPlayersName() {

}

}