CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - string类的方法
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Shot Game
Game Server Simulator
Chess Poker games
Game Engine
Other Riddle games
Mobile games
Other Games
Search - string类的方法 - List
[
Game Program
]
five-chess
DL : 0
(1)首先调用Chessboard 类型的chessboard 属性中的initBoard()与printBoard()方法去初始 化与打印棋盘。 (2)从控制台获取用户的输入。 (3)再调用本类的isValid()方法去验证玩家输入的合法性,如果输入不合法,返回第2 步继续, 否则到第4 步。 (4)把玩家下的棋子位置赋值为 ● 。 (5)调用isWon( int posX , int posY , String chessman )判断玩家是否赢了。如果玩家赢了, 则调用isReply()方法输出的信息询问玩家是否重新游戏,如果玩家输入y,则返回第1 步重新 开始。 (6)调用computerDo()方法随机生成计算机的x,y 坐标,并把board[x][y] 赋值为 ○ 。如果 计算机赢了,则调用isReply()方法输出的信息询问玩家是否重新游戏,如果玩家输入y,则返 回第1 步重新开始,否则返回第2 步轮到用户输入。-(1) The first call Chessboard type chessboard properties initBoard () and printBoard () method to initialize and print the board. (2) to obtain user input the console. (3) and then call this class isValid () method to verify the legitimacy of player input, if the input is not valid, return to step 2 to continue, otherwise to step 4. (4) under the pawn position players assigned to " ●" . (5) calls isWon (int posX, int posY, String chessman) to determine whether the player wins. If the player wins, then call isReply () method outputs information to re-ask the players if the game, if a player enter y, then return to step 1 and start again. (6) calling computerDo () method of a computer generated random x, y coordinates, and the board [x] [y] is assigned " ○" . If the computer wins, then call isReply () method outputs information to re-ask the players if the game, if a player enter y, then return to step 1 to start again, otherw
Date
: 2026-01-01
Size
: 12kb
User
:
冰山一角
[
Game Program
]
String
DL : 0
1.写一个处理字符串的类,包含以下类方法:将字符串里大写字符变小写,小写字符变大写;在字符串中寻找子串的个数和分别出现的位置;将字符串转化为数字,并自动忽略非数字字符;找出两个字符串中相同字符的个数.-1. Write a string handling class that contains the following class method: a string in uppercase characters to lowercase, uppercase becomes lowercase characters to find the number and position of the substring, respectively, appear in the string convert a string digital and automatically ignore non-numeric characters to find the same number of characters in the two strings.
Date
: 2026-01-01
Size
: 1kb
User
:
YWW
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.