Class TokenGrid

java.lang.Object
cs1302.gameutil.TokenGrid

public class TokenGrid extends Object
The TokenGrid class includes convenience methods to display a two-dimensional array of tokens.
Diagram of the cs1302.gameutil.TokenGrid class.
Diagram of the cs1302.gameutil.TokenGrid class.
Related CSCI 1302 projects:
cs1302-c4-alpha
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    println(Token[][] grid)
    Print grid to standard output, including row and column indices.
    static void
    println(Token[][] grid, boolean showIndices)
    Print grid to standard output, including or excluding row and column indices as specified by showIndices.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • println

      public static void println(Token[][] grid, boolean showIndices)
      Print grid to standard output, including or excluding row and column indices as specified by showIndices.
      Parameters:
      grid - the 2D array of tokens to print
      showIndices - whether to show row and column indices in the output
      Throws:
      NullPointerException - if grid is null
    • println

      public static void println(Token[][] grid)
      Print grid to standard output, including row and column indices.
      Parameters:
      grid - the 2D array of tokens to print
      Throws:
      NullPointerException - if grid is null