We're trying to write a text based basketball game that relies on real-life stats instead of an arcade style play.
To do this we import real players statistics into a qbasic file ie sixers.dat
an example would be
"Bell Raj","sixers",1,5,6,1,4,1,3,0,0,0,0,1,1,0,2,1
"McLeod Ra","sixers",2,1,15,1,1,0,1,0,0,0,1,1,0,0,1,2
"Miller Ant","sixers",4,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0
this would be used like this
input #1,name$,p$,g,m,fg,fga,tpt,3pta,ft,fta,ast,oreb,dreb,
stl,blk,turno,pf
now I can get the info in and out of the program fine. However the problem I need help with is this.
Let's say we have a starting lineup of
1. mutombo
2. hill
3. lynch
4. iverson
5. snow
and our other players are lets say
6. McKie
7. Bell
8. MacCollough
Ok, now how do I assign data to these players during the game?
Each team would have 12 around 12 positions so I take it I would have to have the program auto assign these like
homeplayer(1) - homeplayer(2) - homeplayer(3)
how would you go about doing that? How do I assign the different numbers so essentially everytime HILL would score a point I could credit him (player 2) or if Iverson were to get a rebound I could give it to him (player 4) I know there has to be a simple solution I just can not figure it out.
Thanks,
Jamie
isotopes@seeyouonline.com
To do this we import real players statistics into a qbasic file ie sixers.dat
an example would be
"Bell Raj","sixers",1,5,6,1,4,1,3,0,0,0,0,1,1,0,2,1
"McLeod Ra","sixers",2,1,15,1,1,0,1,0,0,0,1,1,0,0,1,2
"Miller Ant","sixers",4,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0
this would be used like this
input #1,name$,p$,g,m,fg,fga,tpt,3pta,ft,fta,ast,oreb,dreb,
stl,blk,turno,pf
now I can get the info in and out of the program fine. However the problem I need help with is this.
Let's say we have a starting lineup of
1. mutombo
2. hill
3. lynch
4. iverson
5. snow
and our other players are lets say
6. McKie
7. Bell
8. MacCollough
Ok, now how do I assign data to these players during the game?
Each team would have 12 around 12 positions so I take it I would have to have the program auto assign these like
homeplayer(1) - homeplayer(2) - homeplayer(3)
how would you go about doing that? How do I assign the different numbers so essentially everytime HILL would score a point I could credit him (player 2) or if Iverson were to get a rebound I could give it to him (player 4) I know there has to be a simple solution I just can not figure it out.
Thanks,
Jamie
isotopes@seeyouonline.com