All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.Match3.src.main.gosu.match3.Stone.gs Maven / Gradle / Ivy

There is a newer version: 1.18.1
Show newest version
package match3

/**
 */
class Stone implements Comparable {
  var _iStoneType: int as StoneType
  var _iRow: int as Row
  var _iColumn: int as Column
  var _bNew: boolean as New
  
  construct( iStoneType: int, iRow: int, iColumn: int ) {
    _iStoneType = iStoneType
    _iRow = iRow
    _iColumn = iColumn
  }

  override function compareTo( to: Stone ): int {
    if( Row < to.Row ) {
      return -1
    }  
    if( Row > to.Row ) {
      return 1
    }
    if( Column < to.Column ) {
      return -1
    }
    if( Column > to.Column ) {
      return 1
    }
    return 0
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy