home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD57855142000.psc / OForm.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-05-14  |  5.9 KB  |  181 lines

  1. VERSION 5.00
  2. Begin VB.Form OForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Super Snakes - by Simon Price - visit www.VBgames.co.uk"
  5.    ClientHeight    =   4416
  6.    ClientLeft      =   36
  7.    ClientTop       =   312
  8.    ClientWidth     =   5364
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   4416
  13.    ScaleWidth      =   5364
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.CommandButton cmdGO 
  17.       Caption         =   "GO!!!"
  18.       Height          =   492
  19.       Left            =   3480
  20.       TabIndex        =   14
  21.       ToolTipText     =   "Click to play Super Snakes"
  22.       Top             =   3840
  23.       Width           =   1092
  24.    End
  25.    Begin VB.Frame Frame3 
  26.       Caption         =   "AI Settings"
  27.       Height          =   1452
  28.       Left            =   2880
  29.       TabIndex        =   9
  30.       Top             =   120
  31.       Width           =   2412
  32.       Begin VB.CommandButton cmdChange 
  33.          Caption         =   "Change"
  34.          Height          =   372
  35.          Left            =   720
  36.          TabIndex        =   12
  37.          ToolTipText     =   "Click here to adjust the AI settings"
  38.          Top             =   960
  39.          Width           =   972
  40.       End
  41.       Begin VB.Label TwitchL 
  42.          Caption         =   "Amount Of Twitching = 150"
  43.          Height          =   252
  44.          Left            =   120
  45.          TabIndex        =   11
  46.          Top             =   720
  47.          Width           =   2052
  48.       End
  49.       Begin VB.Label ThinkL 
  50.          Caption         =   "Amount Of Thinking = 50"
  51.          Height          =   252
  52.          Left            =   120
  53.          TabIndex        =   10
  54.          Top             =   360
  55.          Width           =   2052
  56.       End
  57.    End
  58.    Begin VB.Frame Frame2 
  59.       Caption         =   "Snake Length Settings"
  60.       Height          =   1932
  61.       Left            =   120
  62.       TabIndex        =   4
  63.       Top             =   2400
  64.       Width           =   2652
  65.       Begin VB.HScrollBar GrowthS 
  66.          Height          =   372
  67.          Left            =   120
  68.          Max             =   250
  69.          Min             =   10
  70.          TabIndex        =   7
  71.          Top             =   1080
  72.          Value           =   50
  73.          Width           =   2412
  74.       End
  75.       Begin VB.HScrollBar InitLengthS 
  76.          Height          =   372
  77.          Left            =   120
  78.          Max             =   500
  79.          Min             =   10
  80.          TabIndex        =   5
  81.          Top             =   240
  82.          Value           =   200
  83.          Width           =   2412
  84.       End
  85.       Begin VB.Label GrowthL 
  86.          Caption         =   "Growth Length = 50"
  87.          Height          =   252
  88.          Left            =   120
  89.          TabIndex        =   8
  90.          ToolTipText     =   "How fast the snakes grow/shrink"
  91.          Top             =   1560
  92.          Width           =   2412
  93.       End
  94.       Begin VB.Label InitLengthL 
  95.          Caption         =   "Initial Length = 200"
  96.          Height          =   252
  97.          Left            =   120
  98.          TabIndex        =   6
  99.          ToolTipText     =   "The length of each snake at the start"
  100.          Top             =   720
  101.          Width           =   2412
  102.       End
  103.    End
  104.    Begin VB.Frame Frame1 
  105.       Caption         =   "Select No. of Players"
  106.       Height          =   2172
  107.       Left            =   120
  108.       TabIndex        =   0
  109.       Top             =   120
  110.       Width           =   2652
  111.       Begin VB.OptionButton P 
  112.          Caption         =   "green = human 1, red =human 2, other 2 are computer controlled"
  113.          Height          =   612
  114.          Index           =   2
  115.          Left            =   120
  116.          TabIndex        =   3
  117.          ToolTipText     =   "Play 2 player"
  118.          Top             =   1320
  119.          Width           =   2292
  120.       End
  121.       Begin VB.OptionButton P 
  122.          Caption         =   "green = human, other 3 computer"
  123.          Height          =   372
  124.          Index           =   1
  125.          Left            =   120
  126.          TabIndex        =   2
  127.          ToolTipText     =   "Play 1 player"
  128.          Top             =   840
  129.          Width           =   2292
  130.       End
  131.       Begin VB.OptionButton P 
  132.          Caption         =   "4 computer snakes"
  133.          Height          =   252
  134.          Index           =   0
  135.          Left            =   120
  136.          TabIndex        =   1
  137.          ToolTipText     =   "Watch the computer play on it's own"
  138.          Top             =   360
  139.          Value           =   -1  'True
  140.          Width           =   2292
  141.       End
  142.    End
  143.    Begin VB.Label InfoL 
  144.       BorderStyle     =   1  'Fixed Single
  145.       Height          =   1932
  146.       Left            =   2880
  147.       TabIndex        =   13
  148.       Top             =   1680
  149.       Width           =   2412
  150.    End
  151. Attribute VB_Name = "OForm"
  152. Attribute VB_GlobalNameSpace = False
  153. Attribute VB_Creatable = False
  154. Attribute VB_PredeclaredId = True
  155. Attribute VB_Exposed = False
  156. Private Sub cmdChange_Click()
  157. AIForm.Visible = True
  158. Unload Me
  159. End Sub
  160. Private Sub cmdGO_Click()
  161. InitLength = InitLengthS
  162. GrowthRate = GrowthS
  163. Unload GForm
  164. GForm.Visible = True
  165. End Sub
  166. Private Sub Form_Load()
  167. WriteInfo
  168. End Sub
  169. Private Sub WriteInfo()
  170. InfoL = "Welcome to Super Snakes, a small game I made in just one day. It is an experiment in AI, the challenge was to create snakes that would try to avoid each other. When a snake crashes, it gets shorter and the snake it crashed into gets longer. The last snake crawling wins."
  171. End Sub
  172. Private Sub GrowthS_Change()
  173. GrowthL = "Growth = " & GrowthS
  174. End Sub
  175. Private Sub InitLengthS_Change()
  176. InitLengthL = "Initial Length = " & InitLengthS
  177. End Sub
  178. Private Sub P_Click(Index As Integer)
  179. PlayerNo = Index
  180. End Sub
  181.