Ooops
October 31, 2020, 05:04:13 PM

Author Topic: Football Text Base  (Read 192 times)

Offline Hotshot

  • Jr. Member
  • **
  • Posts: 30
Football Text Base
« on: September 09, 2020, 06:21:42 PM »
Code: [Select]
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]

Offline Matty

  • Hero Member
  • *****
  • Posts: 1213
    • MattiesGames
Re: Football Text Base
« Reply #1 on: September 09, 2020, 08:34:18 PM »
I haven't run it (not at my pc) but it seems quite neat.  Text description of the match.


Offline Hotshot

  • Jr. Member
  • **
  • Posts: 30
Re: Football Text Base
« Reply #2 on: September 09, 2020, 08:36:51 PM »
I have added Goal Score on Name of player score...



 

SimplePortal 2.3.6 © 2008-2014, SimplePortal