Skip to content

Commit

Permalink
remove play with stockfish option
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHeppell committed Mar 4, 2025
1 parent 6b0d2ae commit 81510b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 63 deletions.
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object Dependencies {
val hasher = "com.roundeights" %% "hasher" % "1.2.1"
val jodaTime = "joda-time" % "joda-time" % "2.10.10"
val compression = "org.lichess" %% "compression" % "1.6"
val strategyGames = "org.playstrategy" %% "strategygames" % "10.2.1-pstrat176"
val strategyGames = "org.playstrategy" %% "strategygames" % "10.2.1-pstrat177"
val maxmind = "com.sanoma.cda" %% "maxmind-geoip2-scala" % "1.3.1-THIB"
val prismic = "io.prismic" %% "scala-kit" % "1.2.19-THIB213"
val scrimage = "com.sksamuel.scrimage" % "scrimage-core" % "4.0.33"
Expand Down
42 changes: 8 additions & 34 deletions ui/analyse/src/actionMenu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { isEmpty } from 'common';
import modal from 'common/modal';
import { h, VNode, Hooks } from 'snabbdom';
import { MaybeVNodes } from './interfaces';
import { AutoplayDelay } from './autoplay';
Expand Down Expand Up @@ -207,8 +206,13 @@ export function view(ctrl: AnalyseCtrl): VNode {
? h(
'a.button.button-empty',
{
hook: bind('click', _ => modal($('.continue-with.g_' + d.game.id))),
attrs: dataIcon('U'),
attrs: {
href: d.userAnalysis
? '/?fen=' + ctrl.encodeNodeFen() + '#friend'
: contRoute(d, 'friend') + '?fen=' + ctrl.node.fen,
rel: 'nofollow',
'data-icon': 'U',
},
},
noarg('continueFromHere'),
)
Expand Down Expand Up @@ -366,37 +370,7 @@ export function view(ctrl: AnalyseCtrl): VNode {
.concat(notationConfig)
.concat(cevalConfig)
.concat(ctrl.mainline.length > 4 ? [h('h2', noarg('replayMode')), autoplayButtons(ctrl)] : [])
.concat([
deleteButton(ctrl, ctrl.opts.userId),
canContinue
? h('div.continue-with.none.g_' + d.game.id, [
h(
'a.button',
{
attrs: {
href: d.userAnalysis
? '/?fen=' + ctrl.encodeNodeFen() + '#ai'
: contRoute(d, 'ai') + '?fen=' + ctrl.node.fen,
rel: 'nofollow',
},
},
noarg('playWithTheMachine'),
),
h(
'a.button',
{
attrs: {
href: d.userAnalysis
? '/?fen=' + ctrl.encodeNodeFen() + '#friend'
: contRoute(d, 'friend') + '?fen=' + ctrl.node.fen,
rel: 'nofollow',
},
},
noarg('playWithAFriend'),
),
])
: null,
]),
.concat(deleteButton(ctrl, ctrl.opts.userId)),
);
}

Expand Down
32 changes: 4 additions & 28 deletions ui/editor/src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { dragNewPiece } from 'chessground/drag';
import { eventPosition, opposite } from 'chessground/util';
import { Rules } from 'stratops/types';
import { parseFen } from 'stratops/fen';
import modal from 'common/modal';
import EditorCtrl from './ctrl';
import chessground from './chessground';
import { Selected, CastlingToggle, EditorState } from './interfaces';
Expand Down Expand Up @@ -242,43 +241,20 @@ function controls(ctrl: EditorCtrl, state: EditorState): VNode {
h(
'a',
{
attrs: {
href: '/?fen=' + state.legalFen + '#friend',
rel: 'nofollow',
},
class: {
button: true,
'button-empty': true,
disabled: !state.playable,
},
on: {
click: () => {
if (state.playable) modal($('.continue-with'));
},
},
},
[h('span.text', { attrs: { 'data-icon': 'U' } }, ctrl.trans.noarg('continueFromHere'))],
),
studyButton(ctrl, state),
]),
h('div.continue-with.none', [
h(
'a.button',
{
attrs: {
href: '/?fen=' + state.legalFen + '#ai',
rel: 'nofollow',
},
},
ctrl.trans.noarg('playWithTheMachine'),
),
h(
'a.button',
{
attrs: {
href: '/?fen=' + state.legalFen + '#friend',
rel: 'nofollow',
},
},
ctrl.trans.noarg('playWithAFriend'),
),
]),
]),
]);
}
Expand Down

0 comments on commit 81510b5

Please sign in to comment.