Potato_Boy🦉
Potato_Boy🦉
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
N is the size of the grid and P is the amount of coins . coinvar is for the list so that its adds all the coins to the list but i am not sure if its the correct methode . and the coins are represent with their xy coordinates like 1,0 for exemple where x is 1 then there is a , and then we have y is 0 .
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
that's all of the code i have for now all the data is N = Int32.Parse(data[0]); string[] coord = data[1].Split(','); X = Int32.Parse(coord[0]); Y = Int32.Parse(coord[1]); D = Int32.Parse(data[2]); P = Int32.Parse(data[3]); int Coinvar = 4; var Coins = new List<string>(); int c = 0; for (c=0;c<P;++c) { Coins.Add(data[Coinvar]); Coinvar += 1;
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
it looks something like this and the output must looks like the second one
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
well i don't know how to scan for the coins next to the hero basically and then how to scan with the magic compass
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
sorry if i don't answer right my english isn't the best
29 replies
CC#
Created by Potato_Boy🦉 on 4/23/2023 in #help
Homework Help . How to make a route to find the most amount of coins in a certain amount of moves ?
okay so he know's about all the coins but if they are two or more coins near him he uses the magic compass to decide which one he should go after the magic compass scan the areas and counts the coins that are in each direction and the direction where there are the most coins is where the hero will move too . basically the work is that i have a txt file with all the settings and moves and in the end the results must be the same
29 replies
CC#
Created by Potato_Boy🦉 on 4/16/2023 in #help
Homework Help . how to pick out in a string variable that looks like this 1,2 and only pick out the2
/close
10 replies
CC#
Created by Potato_Boy🦉 on 4/16/2023 in #help
Homework Help . how to pick out in a string variable that looks like this 1,2 and only pick out the2
Thanks a lot it worked ^^
10 replies
CC#
Created by Potato_Boy🦉 on 4/16/2023 in #help
Homework Help . how to pick out in a string variable that looks like this 1,2 and only pick out the2
10 replies
CC#
Created by Potato_Boy🦉 on 4/16/2023 in #help
Homework Help . how to pick out in a string variable that looks like this 1,2 and only pick out the2
10 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
but anyways thank you for your help i am gonna try it for now and i'll get back if i have any issues
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
i don't know if that works like that because i made a code before where i had the though the terminal but the work wants it to work though txt files so my work was wrong
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
because i can run the files on coding room but i am not sure if its right
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
okay thanks i am gonna try it but can i ask what does this do then /* Get data from input file */ var data = new List<String>(); string line; while ((line = Console.ReadLine()) != null) { data.Add(line);
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
i am sorry but i am a bit of begginner i have a lot to learn
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
well i don't really know i think the files can be run on the software but then i don't know is it Console.ReadLine ?
21 replies
CC#
Created by Potato_Boy🦉 on 4/13/2023 in #help
❔ Help with code
does int.TryParse work like that ?
21 replies