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
772357a4
Commit
772357a4
authored
Dec 04, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discarding works
parent
7da2f04f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
Hand.vue
frontend/src/components/Hand.vue
+2
-4
HandModel.js
frontend/src/model/HandModel.js
+0
-3
No files found.
frontend/src/components/Hand.vue
View file @
772357a4
...
...
@@ -31,10 +31,8 @@ export default {
updated
(){
},
methods
:
{
tileClickedListener
:
function
(
tile
){
console
.
log
(
'tile clicked'
);
console
.
log
(
tile
);
let
dicarded
=
this
.
Hand
.
discard
(
tile
);
tileClickedListener
:
function
(
event
){
let
dicarded
=
this
.
Hand
.
discard
(
event
.
id_tuile
);
console
.
log
(
dicarded
);
}
}
...
...
frontend/src/model/HandModel.js
View file @
772357a4
...
...
@@ -13,10 +13,7 @@ export default class Hand{
}
discard
(
tile
){
console
.
log
(
'tiles_left'
);
console
.
log
(
this
.
tiles_left
);
const
tile_ids
=
this
.
tiles_left
.
map
(
tile
=>
tile
.
id_tuile
);
console
.
log
(
tile_ids
);
var
index
=
tile_ids
.
indexOf
(
tile
);
return
this
.
tiles_left
.
splice
(
index
,
1
);
}
...
...
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