package com.github.apixandru.games.rummikub.model;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Alexandru-Constantin Bledea
 * @since December 23, 2015
 */
public class RummikubGame {

    private final Board board;
    private final List<Player> players = new ArrayList<>();

    private final List<Grid> grids = new ArrayList<>();

    /**
     *
     */
    public RummikubGame() {
        this.board = new Board(this); // shouldn't leak this reference...
        this.grids.add(board);
    }

    /**
     * @return
     */
    public Player addPlayer() {
        Player player = new Player(this);
        this.players.add(player);
        this.grids.add(player);
        return player;
    }

    /**
     * @return
     */
    public Board getBoard() {
        return board;
    }

    /**
     * @param card
     */
    public void removeCard(final Card card) {
        grids.stream()
                .forEach((grid) -> grid.removeCard(card));
    }

}

@@ -205,39 +205,8 @@
  %7B%0A%0A
-    private final Board board;%0A
     
@@ -323,171 +323,8 @@
 );%0A%0A
-    /**%0A     *%0A     */%0A    public RummikubGame() %7B%0A        this.board = new Board(this); // shouldn't leak this reference...%0A        this.grids.add(board);%0A    %7D%0A%0A
     
@@ -524,98 +524,8 @@
  %7D%0A%0A
-    /**%0A     * @return%0A     */%0A    public Board getBoard() %7B%0A        return board;%0A    %7D%0A%0A
     

remove unused