Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Essem
Sharkey
Commits
1dc8ad6d
Commit
1dc8ad6d
authored
7 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
✌️
parent
1cff4625
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/othello/core.ts
+8
-1
8 additions, 1 deletion
src/common/othello/core.ts
src/common/othello/maps.ts
+12
-0
12 additions, 0 deletions
src/common/othello/maps.ts
with
20 additions
and
1 deletion
src/common/othello/core.ts
+
8
−
1
View file @
1dc8ad6d
...
...
@@ -235,7 +235,14 @@ export default class Othello {
//}
// 一周して自分に帰ってきたら
if
(
this
.
transformXyToPos
(
x
,
y
)
==
initPos
)
break
;
if
(
this
.
transformXyToPos
(
x
,
y
)
==
initPos
)
{
// ↓のコメントアウトを外すと、「現時点で自分の石が隣接していないが、
// そこに置いたとするとループして最終的に挟んだことになる」というケースを有効化します。(Test4のマップで違いが分かります)
// このケースを有効にした方が良いのか無効にした方が良いのか判断がつかなかったためとりあえず無効としておきます
// (あと無効な方がゲームとしておもしろそうだった)
//stones = stones.concat(found);
break
;
}
}
else
{
if
(
x
==
-
1
||
y
==
-
1
||
x
==
this
.
mapWidth
||
y
==
this
.
mapHeight
)
break
;
}
...
...
This diff is collapsed.
Click to expand it.
src/common/othello/maps.ts
+
12
−
0
View file @
1dc8ad6d
...
...
@@ -834,3 +834,15 @@ export const test3: Map = {
'
b--
'
,
]
};
export
const
test4
:
Map
=
{
name
:
'
Test4
'
,
category
:
'
Test
'
,
data
:
[
'
-w--b-
'
,
'
-w--b-
'
,
'
------
'
,
'
-w--b-
'
,
'
-w--b-
'
]
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment