Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet_info
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TRAN Alain
Projet_info
Commits
719a1200
Commit
719a1200
authored
Mar 31, 2020
by
TRAN Alain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add README.md
parent
685d438e
Pipeline
#481
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
Joueur Humain
Joueur Humain
+41
-0
No files found.
Joueur Humain
0 → 100644
View file @
719a1200
package
tictactoecodingame
;
/**
*
@
author
Franck
*
*/
import
java
.
io
.
InputStreamReader
;
import
java
.
io
.
IOException
;
/**
*
@
author
Franck
*/
public
class
JoueurHumain
extends
Joueur
{
public
JoueurHumain
(
String
_joueur
)
{
super
(
_joueur
);
}
public
Coup
joue
(
Plateau
_plateau
)
{
InputStreamReader
clavier
=
new
InputStreamReader
(
System
.
in
);
char
buffer
[]
=
new
char
[
10
];
String
monCoup
=
null
;
//
Demande
au
joueur
de
saisir
son
Coup
System
.
out
.
println
(
"Votre coup : "
);
try
{
int
nbCar
=
clavier
.
read
(
buffer
,
0
,
5
);
monCoup
=
new
String
(
buffer
,
0
,
nbCar
-
1
);
return
_plateau
.
stringToCoup
(
monCoup
,
this
);
}
catch
(
IOException
e
)
{
return
null
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment