Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: ppat60
  • Order by date
  1. ppat60

    data type confussion

    It is a Board Game, and my board game has squares that are colored {Black, Yellow, Green, Blue, Purple, and Red}. So every user/player is assigned one of those colors. everyone starts on the Land route at the start position, then rolls the die and should move that many spaces. if and only if...
  2. ppat60

    data type confussion

    let me see if I can explain better... I wrote a game in php, now i want to learn how to convert it to C#. I have 3 routes named Land, Water, and Air. These routes are currently Arrays in php. Every user starts on the Land Route at position[0]. then the user rolls the die(1D6). And they get a...
  3. ppat60

    data type confussion

    I am not sure what data type to use. I have three structures that are made 27, 18 and 17 elements. In PHP I have them as Arrays. But I am not sure that is the Best way in C#.I am new to C# and not sure about using Array, ArrayList, Enums. I need to set my three sets of elements then access...
  4. ppat60

    Iteration question when reading CSV

    I will post the entire code. Warning... this is very ugly and was planned for a reason to be like this to some degree.. Here we go. <?php $RouteOne = array ("Start","Black","Black","Black","Yellow","Black","Green","Black","Blue","Black"...
  5. ppat60

    Iteration question when reading CSV

    jpadie, Thanks for your time and help. I tested what you wrote, but I had some issues. I am using php -v 5.1.2 my first isshe was an Unexpected while in the while(while(... when I dropped one of the while statement then I had object issues, because I need $Player_Array[0-3][6] to call a member...
  6. ppat60

    Iteration question when reading CSV

    My last issue at last :) . I have uncovered a poor logical error on my part. I hope the CSV file and being reading it in(that was the easy part). I only want to read in the first 4 turns/players and store their data(okay that wasn't to bad either). I am using a for loop for that one. Then I use...
  7. ppat60

    When is it a good time to create another class in php?

    When is it a good time to create another class in php? I have functions that belong to three separate arrays, that are getting very large in class Player. Which me asks how does one class in php call another class to use it member functions? Thanks in advance.
  8. ppat60

    I am not sure why it won't compare?

    I figured it out. I am not sure how to fix it though. The variable $saveNewPos is in an array format for Yellow. What i mean is $saveNewPos[0] = Y, $saveNewPos[1] = e ... etc. I assume that becase I am using $Array[$i] to loop through my array or something. Is there a way I can somehow create...
  9. ppat60

    I am not sure why it won't compare?

    sleipnir214, i did verify that I only spelled "Yellow" once in the very begin to insert it into an array $RouteOne. Then I insert that array into an assoc array at indexes [1][5]. Then during Enact_Turn function I assign $Player_Array[1][5] to a varable $myRteArray then I assing it to something...
  10. ppat60

    I am not sure why it won't compare?

    Okay so I am think I have it narrowed down to what the issue is now, however I do not know how to fix. I am using a for loop to cycle through an arra like this. for($i = 0; $i <= $data[1]; $i++) { echo("(MoveArray) landed on : "); echo( $saveNewPos = $Array[$i]. "<br>"); } So then I...
  11. ppat60

    Best way to read a CSV file

    Hi I am very new to C# that my first learning curve. :) My question is How do I read a CSV(Comma Separated Value) file to be processed? Or should I ask what is the best way to process a CSV? Thank you in advance.
  12. ppat60

    I am not sure why it won't compare?

    sleipnir214 thanks for your insight. after implemented your structure, I am still have the same issue. Which is I can not get any of my if statement to work. when I echo this out(below) echo "data[0] = " .$data[0]. " <br>saveNewPos = " .$saveNewPos. " <br>"; it returns this: data[0] =...
  13. ppat60

    I am not sure why it won't compare?

    I am passing in $data as an array Color, Number(1-6); $RouteTwo is an array of 18 elelments of colors{Red, Yellow, Green, Blue, Black}; and $saveNewPos is a variable that stores a color from another function. I want to compare $data[0] to $saveNewPos, but it does not appear to work. when I echo...

Part and Inventory Search

Back
Top