Merineth πŸ‡ΈπŸ‡ͺ
Merineth πŸ‡ΈπŸ‡ͺ
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 2/18/2025 in #help
Othello Reversi game
I'm supposed to create an entire othello also called Reversi game from scratch in C# WPF application. I*m gonna be completely and utterly honest, i have no idea what to do and this assignment is way to hard for me. It's about 6+ months overdue and it's supposed to be done in groups of 3+ but the ones in my group just hopped of the course. I'm unironically desperate for some help and would really appreciate it if someone had some time during the day to help me wrap this up. I've done most of the stuff already but i need help with the main logic. I'm desperate.
1493 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 1/30/2025 in #help
othello game
public override async Task<(int x, int y)> RequestMove(GameBoard board, List<(int x, int y)> validMoves)
{
/* while (the user hasn't made a valid move)

request a valid move from the user

end while

save the move as x and y
return x and y

*/
}
public override async Task<(int x, int y)> RequestMove(GameBoard board, List<(int x, int y)> validMoves)
{
/* while (the user hasn't made a valid move)

request a valid move from the user

end while

save the move as x and y
return x and y

*/
}
9 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 1/19/2025 in #help
βœ… Othello game
No description
13 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 1/16/2025 in #help
Othello game
No description
45 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 1/15/2025 in #help
Othello WPF game
I'm absolutely desperate for some help. I'm triyng to make a othello game for like 6 months now but i just don't know what to do and i just want to finish this godforsaken assignment. The video shows how far i've come.
385 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 11/23/2024 in #help
Troubleshooting xaml - initialize window
No description
180 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/13/2024 in #help
βœ… Factory method
like i sincerely don’t understand this concept. could someone elaborate?
5 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/13/2024 in #help
βœ… 'where' constraints
No description
1 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/11/2024 in #help
βœ… Can someone explain Delegates to me like i'm 5?
:(
322 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/9/2024 in #help
Creating a class Player based on instructions
No description
97 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/9/2024 in #help
βœ… WPF Application, renaming
No description
121 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/9/2024 in #help
βœ… Help interpreting classes
No description
2 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/8/2024 in #help
βœ… What is a concrete class?
And what is the difference between a concrete class and an abstract class?
4 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/7/2024 in #help
βœ… Delegates. What are they and what are they used for?
^
375 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/3/2024 in #help
Exceptions.
No description
144 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/2/2024 in #help
βœ… Exception handling..
namespace Calculator.Model
{
internal class Division
{
public decimal Run(decimal number1, decimal number2)
{
if (number2 == 0)
{
throw new AlexDivideByZeroException();
}

return number1 / number2;
}

}
}
namespace Calculator.Model
{
internal class Division
{
public decimal Run(decimal number1, decimal number2)
{
if (number2 == 0)
{
throw new AlexDivideByZeroException();
}

return number1 / number2;
}

}
}
When the method Run encounters an instance where number2 == 0 i want it to throw an exception BUT i dont want the program to stop. How does that work?
100 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/2/2024 in #help
βœ… Different output on same code.
No description
109 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 10/2/2024 in #help
βœ… System.FormatException
No description
9 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 9/30/2024 in #help
βœ… ”base”
public class Person
{
protected string ssn = "444-55-6666";
protected string name = "John L. Malgraine";

public virtual void GetInfo()
{
Console.WriteLine("Name: {0}", name);
Console.WriteLine("SSN: {0}", ssn);
}
}
class Employee : Person
{
public string id = "ABC567EFG";
public override void GetInfo()
{
// Calling the base class GetInfo method:
base.GetInfo();
Console.WriteLine("Employee ID: {0}", id);
}
}

class TestClass
{
static void Main()
{
Employee E = new Employee();
E.GetInfo();
}
}
/*
Output
Name: John L. Malgraine
SSN: 444-55-6666
Employee ID: ABC567EFG
*/
public class Person
{
protected string ssn = "444-55-6666";
protected string name = "John L. Malgraine";

public virtual void GetInfo()
{
Console.WriteLine("Name: {0}", name);
Console.WriteLine("SSN: {0}", ssn);
}
}
class Employee : Person
{
public string id = "ABC567EFG";
public override void GetInfo()
{
// Calling the base class GetInfo method:
base.GetInfo();
Console.WriteLine("Employee ID: {0}", id);
}
}

class TestClass
{
static void Main()
{
Employee E = new Employee();
E.GetInfo();
}
}
/*
Output
Name: John L. Malgraine
SSN: 444-55-6666
Employee ID: ABC567EFG
*/
Is the β€œbase” keyword only used to get the superclasses info?
31 replies
CC#
Created by Merineth πŸ‡ΈπŸ‡ͺ on 9/28/2024 in #help
βœ… Exception handling
I'm trying to understand exceptions but i'm having a hard time. So when an error occurs in my program. For example :
int number = Console.Readline();
Console.Writeline($"{number}");
int number = Console.Readline();
Console.Writeline($"{number}");
If the input here in this case wasn't an integer but a string. The program would crash right? And to prevent it from crashing we use exception handling with try and catch ?
31 replies