-
-
Save ryuichimatsumoto-single/2329854 to your computer and use it in GitHub Desktop.
| #define board_size 5 | |
| #include<stdio.h> | |
| main() | |
| { | |
| int board[board_size][board_size]; | |
| int i; | |
| for(i= 0;i<board_size;i++) | |
| { | |
| board[i][j] = 0;//initlizing board | |
| } | |
| } |
| /* | |
| *@NOTICE:SORRY,THIS CODE CANNOT WORK! | |
| *@author Ryuichi Matsumoto | |
| *@date 2012.4.8 | |
| */ | |
| function alternative_board(size) | |
| { | |
| this.row = size | |
| this.col = size; | |
| this.board[row][col]; | |
| for(var i=0;i<size;i++) | |
| { | |
| for(var j=0;j<size;j++) | |
| { | |
| this.board[i][j] = 0;//ボードの初期化 | |
| } | |
| } | |
| /* | |
| *ボードに○×を付ける(write ○ or × on board) | |
| */ | |
| this.putboard = function(row,col,player) | |
| { | |
| this.board[row][col] = player; | |
| } | |
| /* | |
| *ボードの判定 | |
| */ | |
| this.checkboard = function(player) | |
| { | |
| /*縦の判定*/ | |
| var check_row = 0;//縦の判定フラグ | |
| var check_col = 0;//横の判定フラグ | |
| var check_quater1 = 0;//斜め(1)のフラグ | |
| var check_quater2 = 0;//斜め(2)のフラグ | |
| /*横の判定*/ | |
| for(var i=0;i<this.row;i++) | |
| { | |
| check_row = 0;//判定に入る前に初期化 | |
| for(var j=0;j<this.col;j++) | |
| { | |
| if(this.board[i][j] == player) | |
| { | |
| check_row++; | |
| } | |
| } | |
| if(check_row == this.row) | |
| { | |
| return 1; | |
| } | |
| } | |
| /*縦の判定*/ | |
| for(var i=0;i<this.row;i++) | |
| { | |
| check_col = 0;//判定に入る前に初期化 | |
| for(var j=0;j<this.col;j++) | |
| { | |
| if(this.board[j][i] == player) | |
| { | |
| check_col++; | |
| } | |
| } | |
| if(check_col == this.col) | |
| { | |
| return 1; | |
| } | |
| } | |
| /*斜めの判定(1)*/ | |
| for(var i=0;i<this.row;i++) | |
| { | |
| if(this.board[i][i] == player) | |
| { | |
| check_quater1++; | |
| } | |
| } | |
| if(check_quater1 == this.col) | |
| { | |
| return 1; | |
| } | |
| } | |
| /*斜めの判定(2)*/ | |
| for(var i=0;i<this.row;i++) | |
| { | |
| if(this.board[this.row - i][i] == player) | |
| { | |
| check_quater2++; | |
| } | |
| } | |
| if(check_quater2 == this.col) | |
| { | |
| return 1; | |
| } | |
| } | |
| } | |
| } |
| <html> | |
| <script type="text/javascript"> | |
| /* | |
| *alternative_board:ボードを定義するクラス | |
| *@row:縦,col:横 | |
| *@this.board:○×の判定 0:何も置かれていない(default) 1:player1(○) 2:player2(×) | |
| *@author Ryuichi Matsumoto | |
| *@date 2012.4.8 | |
| */ | |
| function alternative_board() | |
| { | |
| this.board =[['0','0','0','0','0'],['0','0','0','0','0'],['0','0','0','0','0'],['0','0','0','0','0'],['0','0','0','0','0']] ; | |
| } | |
| var Board = new alternative_board(); | |
| </script> | |
| </html> |
The “ryuichimatsumoto-single/alternative_board (C version)” project appears to be a lightweight implementation of an alternative message board system written in the C programming language. Designed with efficiency and minimalism in mind, this type of application typically focuses on fast performance, low memory usage https://ffh4x.com.br/, and direct control over system resources. Unlike higher-level web frameworks, a C-based board requires manual handling of data structures, file I/O, and possibly socket programming for handling user requests.
The ryuichimatsumoto-single project demonstrates how low-level programming can create efficient and lightweight communication systems. Its focus on memory management, file handling, and performance optimization makes it valuable for developers learning backend fundamentals. Projects like this highlight the flexibility of C for system-level applications. Exploring communities discussing kolofortuny and similar platforms may also inspire practical implementations, optimization strategies, and real-world coding techniques in minimalist software development environments.
it does not work