Football Text Base

Started by Hotshot, September 09, 2020, 18:21:42

Previous topic - Next topic

Hotshot


Graphics 800,600
SetBuffer BackBuffer()

Background=LoadImage("images/football-pitch.jpg")
Boxed=LoadImage("images/Boxed.png")

SeedRnd MilliSecs()

Start_Timer=0
Event=0
Text_Base$="Kick Off"
Time=250
Score_1=0
Score_2=0
j=70

Print "Kick Off...."
MilliSecs()
Print

While Not KeyDown(1)
      Cls
      Start_Timer=Start_Timer+1
      j=j+10
      Locate 10,10:Print "England "+Score_1+"  Holland "+Score_2

      If Start_Timer=46
         Text_Base$="Half time"
         time=10000
      EndIf

      If Start_Timer=47
         Time=250
      EndIf

      If Start_Timer=90
        Text_Base$="FULL Time!"
        Time=10000
      EndIf
     
      Events=Rnd(7)
      Team=Rnd(2)

      Select events
           Case 0
                 Text_Base$= "......................."
           Case 1                 
                 Goal=Rnd(2)
                 If Goal=0 Then Text_Base$="Goal Disallow !!!    "
                 If Goal=1 Then Text_Base$= "England have scored!" Score_1=Score_1+1
                 If Goal=2 Then Text_Base$= "Holland have scored!" Score_2=Score_2+1      
   Case 2
         If team=0 Then Text_Base$= "......................."
         If team=1 Then Text_Base$= "England shot And missed"
         If team=2 Then Text_Base$= "Holland shot And missed"

   Case 3          
         If team=0 Then Text_Base$= "......................."
         If team=1 Then Text_Base$= "England missed by a mile"
         If team=2 Then Text_Base$= "Holland missed by a mile"

   Case 4             
If team=0 Then Text_Base$= "......................."
         If team=1 Then Text_Base$= "England received a yellow card"
         If team=2 Then Text_Base$= "Holland received a yellow card"

   Case 5           
If team=0 Then Text_Base$= "......................."
         If team=1 Then Text_Base$= "England have had a player sent off"
         If team=2 Then Text_Base$= "Holland have had a player sent off"
   Case 6           
If team=0 Then Text_Base$= "......................."
         If team=1 Then Text_Base$= "England have a corner"
         If team=2 Then Text_Base$= "Holland have a corner"

   Case 7          
If team=0 Then Text_Base$= "......................."
         If team=1 Then Text_Base$= "England have a free-kick"
         If team=2 Then Text_Base$= "Holland have a free-kick"
           End Select

     ; DrawImage Background,0,0
     ; DrawImage Boxed,0,0

      Locate 0,48:Print "Time "+Start_Timer
      Print
      Print Text_Base$
      Flip

      Delay(time)
      ; Start game time
Wend






Not perfect but I am sure it can improve :)[/size][/code]

Matty

I haven't run it (not at my pc) but it seems quite neat.  Text description of the match.


Hotshot

#2
I have added Goal Score on Name of player score...