Another little word game

Post Reply
Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Another little word game

Post by Henko »

A word is "written" in the tableau using the knight jump from the chess game. Try to find the starting position and the rest of the word using knight jumps.

Code: Select all

option base 1 ! randomize() ! nw=10
graphics ! graphics clear
set buttons font size 100 ! draw font size 80 ! draw color 0,0,1
dim words$(nw),jump(9,2)
for i=1 to 9 ! for j=1 to 2 ! read jump(i,j) ! next j ! next i
for i=1 to nw ! read words$(i) ! next i
data 6,8, 7,9, 4,8, 3,9, 0,0, 1,7, 2,6, 1,3, 2,4
for i=1 to 9
  x=150+150*((i-1)%3) ! y=150+150*floor((i-1)/3)
  button i text "" at x,y size 120,120
  next i
  button 5 text "🌑" ! set buttons font size 30
  button "show" text "show word" at 370,750 size 200,80
  button "next" text "next one" at 150,750 size 200,80
do
  dim stat(9) ! graphics clear
  k=1+rnd(nw) ! word$=words$(k) 
  for i=1 to 8 ! letter$(i)=mid$(word$,i,1) ! next i
  do ! pt=1+rnd(9) ! until pt<>5
  for i=1 to 8
    stat(pt)=1 ! a=jump(pt,1) ! b=jump(pt,2)
    button pt text letter$(i)
    if stat(a)=0 and stat(b)=0 then
      if rnd(1)<.5 then pt=a else pt=b
      continue
      end if
    if stat(a)=0 then ! pt=a ! continue ! end if
    if stat(b)=0 then ! pt=b ! continue ! end if
    next i
    do slowdown
      if button_pressed("show") then draw text word$ at 180,620
      until button_pressed("next")
  until forever
data "earliest","treasure","transits","narrator","erasures"
data "interior","interest","irritant","disaster","loiterer"
end
IMG_1421.PNG
IMG_1421.PNG (1.47 MiB) Viewed 2335 times

User avatar
Dav
Posts: 279
Joined: Tue Dec 30, 2014 5:12 pm
My devices: iPad Mini, iPod Touch.
Location: North Carolina, USA
Contact:

Re: Another little word game

Post by Dav »

Great concept, Henko. I like it.

- Dav

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Another little word game

Post by GeorgeMcGinn »

Hi Dav,

A great challenging game. Good job.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Another little word game

Post by Henko »

The concept is not mine. It is one of the 12 questions in the tele program that i mentioned before.
The first letter of each of the 12 answers form the final taks of guessing the word that can be made out of 12 letters. That was the other little word game i submitted.

Post Reply