areacellposition .java

来自「用JAVA编写的数独游戏源代码,帮助你快速得到游戏的答案」· Java 代码 · 共 26 行

JAVA
26
字号


class AreaCellPosition {
	 int i ;
	 int j ;
	 
	 AreaCellPosition(int small_row_index , int small_column_index ) {
	 	this.i = small_row_index ;
	 	this.j = small_column_index ;
	 }

	 AreaCellPosition(int small_index) {
	 	this.i = small_index/3 ;
	 	this.j = small_index%3 ;
	 }

	 int getIndex() {
	 	return i*3+j ;
	 }
	 
 	 static AreaCellPosition getAreaCellPosition( int datasRow_index , int datasColumns_index ) {
	 	return new AreaCellPosition( datasRow_index%3 , datasColumns_index%3 ) ;
	 }

	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?