Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Quentin Vrel
projet-cdaw
Commits
17c085eb
Commit
17c085eb
authored
Dec 03, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed
parent
2692556e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
2 deletions
+8
-2
HandModel.js
frontend/src/model/HandModel.js
+8
-2
PlayerModel.js
frontend/src/model/PlayerModel.js
+0
-0
RoundModel.js
frontend/src/model/RoundModel.js
+0
-0
TileModel.js
frontend/src/model/TileModel.js
+0
-0
UserModel.js
frontend/src/model/UserModel.js
+0
-0
No files found.
frontend/src/model/Hand.js
→
frontend/src/model/Hand
Model
.js
View file @
17c085eb
...
...
@@ -41,9 +41,15 @@ export default class Hand{
pungArray
=
[];
const
tile_ids
=
this
.
tiles_left
.
map
(
tile
=>
tile
.
id_tuile
);
ids_set
=
new
Set
(
tile_ids
);
ids_set
.
forEach
(
tile
=>
{
ids_set
.
forEach
(
unique_tile
=>
{
var
count
=
tile_ids
.
reduce
(
function
(
n
,
val
)
{
return
n
+
(
val
===
unique_tile
);
},
0
);
if
(
count
>=
3
){
pungArray
.
push
(
unique_tile
);
}
})
return
pungArray
;
}
/**
...
...
frontend/src/model/Player.js
→
frontend/src/model/Player
Model
.js
View file @
17c085eb
File moved
frontend/src/model/Round.js
→
frontend/src/model/Round
Model
.js
View file @
17c085eb
File moved
frontend/src/model/Tile.js
→
frontend/src/model/Tile
Model
.js
View file @
17c085eb
File moved
frontend/src/model/User.js
→
frontend/src/model/User
Model
.js
View file @
17c085eb
File moved
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