From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: Re: Lisp Live buffer
Date: Fri, 23 Dec 2022 11:15:16 +0300 [thread overview]
Message-ID: <Y6VjlJStJwFRfCeC@protected.localdomain> (raw)
In-Reply-To: <87lenjq35z.fsf@dataswamp.org>
* Emanuel Berg <incal@dataswamp.org> [2022-12-07 15:09]:
> Jean Louis wrote:
>
> > Just use prin1-to-string and insert updated structure
> > in intervals.
>
> For example this WarGames Spanish football game?
>
> (setq ttt-board
> (list
> '(x o o)
> '(· x ·)
> '(· · x) ))
>
> Next cool thing would be there would not be any 'score' or
> other stats stored in variables, instead that would be
> computed from the board (game world) each time ...
When you mention it, I must think that there must be some variable
telling who was the last player, as for game to determine who wins it.
Deviation from subject:
I can only guess that such game exist in Emacs. Though I could use my
package rcd-box.el to construct the interface.
(rcd-box-table '(("X" " " "X")
(" " "X" "O")
(" " " " "O"))) ➜ "
╔═══╦═══╦═══╗
║ X ║ ║ X ║
╠═══╬═══╬═══╣
║ ║ X ║ O ║
╠═══╬═══╬═══╣
║ ║ ║ O ║
╚═══╩═══╩═══╝
"
And I know I can insert buttons as well, by using RCD Utilities
function `rcd-button-insert', see footnote.
(insert
(rcd-box-table (list (list "X" " " (with-temp-buffer (rcd-button-insert "X" 'ignore) (buffer-string)))
'(" " "X" "O")
'(" " " " "O"))))
╔═══╦═══╦═══╗
║ X ║ ║ X ║ <--- this X becomes visible as button
╠═══╬═══╬═══╣
║ ║ X ║ O ║
╠═══╬═══╬═══╣
║ ║ ║ O ║
╚═══╩═══╩═══╝
Buttons may have it's functions, so clicking on the button could
remove or eventually place something in the list, and redraw the
table.
Somebody called Gomoku Tic Tac Toe, but it is not same, though similar.
Emacs Tic Tac Toe. It is called gomoku in Emacs. Use the… | by Akash Manohar | 1 command a day | Medium:
https://medium.com/1cmd/emacs-tic-tac-toe-81a334fd3fd7
Version exists here, but the author hosted images at imgur.com which are not available any more:
accidentalrebel/emacs-tic-tac-toe-improved: An improved tic-tac-toe game project for me to practice my Emacs Lisp.:
https://github.com/accidentalrebel/emacs-tic-tac-toe-improved
Other version is here:
https://github.com/accidentalrebel/emacs-tic-tac-toe-game/blob/master/tic-tac.el
That is such a boring game, and also unfair, as once trick is known, there will be too many wins.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
GNU Emacs package: rcd-utilities.el :
https://gnu.support/gnu-emacs/packages/rcd-utilities-el.html
next prev parent reply other threads:[~2022-12-23 8:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 15:44 Lisp Live buffer Emanuel Berg
2022-12-07 3:06 ` Jean Louis
2022-12-07 3:54 ` Emanuel Berg
2022-12-23 8:15 ` Jean Louis [this message]
2022-12-26 20:26 ` Emanuel Berg
2022-12-27 1:12 ` Emanuel Berg
2022-12-28 0:32 ` Emanuel Berg
2022-12-28 2:04 ` Emanuel Berg
2022-12-28 2:08 ` Emanuel Berg
2022-12-28 9:25 ` tomas
2022-12-28 19:53 ` Emanuel Berg
2022-12-28 23:20 ` Emanuel Berg
2022-12-08 11:32 ` Madhu
2022-12-23 8:23 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y6VjlJStJwFRfCeC@protected.localdomain \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).