hello, I’m having some issues with this puzzle for some reason its giving me an error saying that the closing bracket for the class declaration is unexpected here’s my code:
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
/**
* The while loop represents the game.
* Each iteration represents a turn of the game
* where you are given inputs (the heights of the mountains)
* and where you have to print an output (the index of the mountain to fire on)
* The inputs you are given are automatically updated according to your last actions.
**/
class Player
{
static void Main(string[] args)
{
var hMax = 0;
var iMax = 0;
// game loop
while (true)
{
for (int i = 0; i < 7; i++)
{
int mountainH = int.Parse(Console.ReadLine()); // represents the height of one mountain, from 9 to 0. Mountain heights are provided from left to right.
if (mountainH > max)
{
hMax = mountainH;
imax = i;
{
};
// Write an action using Console.WriteLine()
// To debug: Console.Error.WriteLine("Debug messages...");
// The index of the mountain to fire on.
}
}
}
I completely agree, what a mess this is on my screen. Four separate tabs all with very little explanation. To top it off they just drop you right in and expect you to know everything. This is a heaping pile of trash.
Why is it forbidden to post code? I took a MOOG course for Python, and it also would not let us post code; so i never could finish the course since I got stuck on one problem and was barred from going further. Is this some Python religious thing?
Hey Im new to coding and would like some help on where to start, I’m working in JavaScript and understand the patterns of the heights of the mountains,
I’m unsure of how to link all the combinations into code so that the game works,
A reply would be very appreciated