Page 1 of 1

Another little word game

Posted: Thu Oct 05, 2017 9:38 pm
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 2995 times

Re: Another little word game

Posted: Thu Oct 05, 2017 10:17 pm
by Dav
Great concept, Henko. I like it.

- Dav

Re: Another little word game

Posted: Sat Oct 07, 2017 7:28 am
by GeorgeMcGinn
Hi Dav,

A great challenging game. Good job.

Re: Another little word game

Posted: Sun Oct 08, 2017 8:04 am
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.