Hey there! Sign in to join this conversationNew here? Join for free

is anyone doing the AQA computing science, greenfly scenario?(4512/cb4) Watch

    • Thread Starter
    Offline

    1
    ReputationRep:
    I am stuck on how to run the model, i don't know the bit of coding necessary to display the different generations depending on the numbers inputted by the user.
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by akirne39)
    I am stuck on how to run the model, i don't know the bit of coding necessary to display the different generations depending on the numbers inputted by the user.
    I'll try to include that bit when I send you a pm later. Sorry I haven't replied before, everything is on my laptop which I haven't been able to get on for a couple of days
    Offline

    0
    ReputationRep:
    did you manage to find out how to do it? I'm stuck on the same thing.
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by J565)
    did you manage to find out how to do it? I'm stuck on the same thing.
    You'll need a variable which stores the number which the user inputs then have a loop which loops that number of times doing the calculations each time
    Offline

    7
    ReputationRep:
    im stuck on how to move the player in treasure hunt game


    (plz dnt send any coding lol cos i dnt want to be banned from my exams)

    but abrief explanation would be ncie
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by Chez 01)
    im stuck on how to move the player in treasure hunt game


    (plz dnt send any coding lol cos i dnt want to be banned from my exams)

    but abrief explanation would be ncie
    What tools are you using (as in data grid view etc.)
    What platform/ language? (Visual Studio/ Visual basic etc.)
    Our code isn't allowed out of school so I couldn't have sent it even if I wanted to lol

    Posted from TSR Mobile
    Offline

    7
    ReputationRep:
    (Original post by Lemur14)
    What tools are you using (as in data grid view etc.)
    What platform/ language? (Visual Studio/ Visual basic etc.)
    Our code isn't allowed out of school so I couldn't have sent it even if I wanted to lol

    Posted from TSR Mobile
    lol and thnx for the quick reply

    i am using a picturebox for my grid and i am using visual studio express
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by Chez 01)
    lol and thnx for the quick reply

    i am using a picturebox for my grid and i am using visual studio express
    Sorry, lots of questions, just trying to get an idea of how you have yours working.
    One picture box or many?
    And do you have a way of linking them together (if many)?

    I haven't seen anyone use pictureboxes for it, but I used a table layout panel, which can be matched with a 2D array and each of the squares can have their content changed to X if the player chooses to land there.
    So I have a variable storing the current player position, then when the player enters in their move I have another variable which adds the 2 together and finds if the position is within the grid. If it is the player position is set to this new value and the X I have showing the player position is moved to this new place.
    This method is quite complicated though and most my classmates took the simpler option of putting 2 data grid views on top of each other.

    Could you explain how you got your chests and bandits to be randomised?

    (Sorry probably not much help yet!)

    Posted from TSR Mobile
    Offline

    7
    ReputationRep:
    (Original post by Lemur14)
    Sorry, lots of questions, just trying to get an idea of how you have yours working.
    One picture box or many?
    And do you have a way of linking them together (if many)?

    I haven't seen anyone use pictureboxes for it, but I used a table layout panel, which can be matched with a 2D array and each of the squares can have their content changed to X if the player chooses to land there.
    So I have a variable storing the current player position, then when the player enters in their move I have another variable which adds the 2 together and finds if the position is within the grid. If it is the player position is set to this new value and the X I have showing the player position is moved to this new place.
    This method is quite complicated though and most my classmates took the simpler option of putting 2 data grid views on top of each other.

    Could you explain how you got your chests and bandits to be randomised?

    (Sorry probably not much help yet!)

    Posted from TSR Mobile
    no i just basically declared my gridcells as (8,8) picturebox
    so its 1 picturebox with (8,8) cells in in and im referring to my cells as gridbox in my program

    ive used a radio button and the player gets to choose up or down and left or right thenthey can input how many steps they want to mve vertically and horizontally and

    ive decalred my player location as x and y cos i know my coordinates for my grid and i coded -1 to move up and right +1 to move left and down
    idk i think ive worded to make it sund comlicated i think its similar to wot u sed
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by Chez 01)
    no i just basically declared my gridcells as (8,8) picturebox
    so its 1 picturebox with (8,8) cells in in and im referring to my cells as gridbox in my program

    ive used a radio button and the player gets to choose up or down and left or right thenthey can input how many steps they want to mve vertically and horizontally and

    ive decalred my player location as x and y cos i know my coordinates for my grid and i coded -1 to move up and right +1 to move left and down
    idk i think ive worded to make it sund comlicated i think its similar to wot u sed
    Yeah that does sounds quite similar to mine So if you said Gridcells(3,2) your program would know which cell that was?
    If so, you'll basically want to add the values of your current position and how far the user wants to move together. Then test if this is in the grid.
    If it is in the grid then you can put Gridcells(UserXCoord, UserYCoord) = "X" (Well not quite that as that isn't how you refer to a picture box, but I can't remember how to do that, so hopefully you get the idea)
    Then you test it against however your chests and bandits are called and act accordingly
    Test if the user has won. Act accordingly.
    Then repeat when the user enters in a new move

    Hope that makes sense

    Posted from TSR Mobile
    Offline

    7
    ReputationRep:
    (Original post by Lemur14)
    Yeah that does sounds quite similar to mine So if you said Gridcells(3,2) your program would know which cell that was?
    If so, you'll basically want to add the values of your current position and how far the user wants to move together. Then test if this is in the grid.
    If it is in the grid then you can put Gridcells(UserXCoord, UserYCoord) = "X" (Well not quite that as that isn't how you refer to a picture box, but I can't remember how to do that, so hopefully you get the idea)
    Then you test it against however your chests and bandits are called and act accordingly
    Test if the user has won. Act accordingly.
    Then repeat when the user enters in a new move

    Hope that makes sense

    Posted from TSR Mobile
    yes if i called the cell (3,2) my progra would know what it is

    basically i didnt quite understand what u explained there

    but i used the x and y coordinates in mycding to move the player but when i run the program instead of moving the player the player dissappears from the grid

    hope that makes sense
    Offline

    7
    ReputationRep:
    (Original post by Chez 01)
    yes if i called the cell (3,2) my progra would know what it is

    basically i didnt quite understand what u explained there

    but i used the x and y coordinates in mycding to move the player but when i run the program instead of moving the player the player dissappears from the grid

    hope that makes sense
    oh yeah and you asked how i got my bandits and chests randomised (sorry i didnt see your question b4)

    basically to randomize them i used a do until loop and if statement inside the loop
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by Chez 01)
    yes if i called the cell (3,2) my progra would know what it is

    basically i didnt quite understand what u explained there

    but i used the x and y coordinates in mycding to move the player but when i run the program instead of moving the player the player dissappears from the grid

    hope that makes sense
    How is the player programmed to move? (As in, does it add text to the cell, or move a label around etc.)

    Posted from TSR Mobile
    • TSR Support Team
    Offline

    21
    ReputationRep:
    TSR Support Team
    (Original post by Chez 01)
    oh yeah and you asked how i got my bandits and chests randomised (sorry i didnt see your question b4)

    basically to randomize them i used a do until loop and if statement inside the loop
    Don't worry You basically answered my question when talking about how your program responds anyway

    Posted from TSR Mobile
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Brussels sprouts
    Useful resources

    Study tools

    Rosette

    Essay expert

    Learn to write like a pro with our ultimate essay guide.

    Thinking about uni already?

    Thinking about uni already?

    See where you can apply with our uni match tool

    Student chat

    Ask a question

    Chat to other GCSE students and get your study questions answered.

    Creating

    Make study resources

    Create all the resources you need to get the grades.

    Planner

    Create your own Study Plan

    Organise all your homework and exams so you never miss another deadline.

    Resources by subject

    From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

    Papers

    Find past papers

    100s of GCSE past papers for all your subjects at your fingertips.

    Help out other students

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.