Friday, September 30, 2022

Lesson of Visual studio (Pt2)

 Visual studio (pt2) Vending Machine

still learning to input values and the difference between int and string also = and == 

class Program

    {

        


        static void Main(string[] args)

        {

            Console.WriteLine("Please select your item of choice");

            Console.WriteLine("A1");//goes to five or something, but all start at 1 

            Console.WriteLine("B2");

            Console.WriteLine("C3");


            string choice = Console.ReadLine();


            if (choice == "A1") //or A1 to A5

            {

                Console.WriteLine("you have selected A1 please choose payment method");


            }


            string choice2 = Console.ReadLine();


            if (choice == "B2") //or B1 to B5

            {

                Console.WriteLine("you have selected B2 please choose payment method");

            }


            string choice3 = Console.ReadLine();


            if (choice == "C3") //or C1 to C3

            {

                Console.WriteLine("you have selected B2 please choose payment method");

            }


        }

    }

}


Lesson of Visual studio

Visual Studio work (Pt1)

Creating the start menu for a game

class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine("Hello World!");


            //Basic if statement setup

            if (true)

            {


                //do this thing

            }


            int playerHealth = 10;

            if (playerHealth > 0)

            {

                Console.WriteLine("Player is still alive");



            }


            //Relational Operators

            // '>' = Greater Than

            // '<' = Less Than

            // '==' = Equals to

            // playerHealth == 10; <-- Checking if playerhealth is equal to 10

            // player = 10; <-- Sets the playerhealth to 10

            // '>=' = Greater than or equals to

            // '<=' = Less than or equal to 

            // '!=' = Not equal to


            if (playerHealth != 0)

            {

                Console.WriteLine("Player health does not equal 0");

            }

            //if the first statement is false4

            // use an else if to check another statement

            else if (playerHealth <= 0)

            {

                Console.WriteLine("Players health is less than or equals to 0");

            }

            //if all statements are false, run this as a defualt

            else

            {

                Console.WriteLine("Error! Something went wrong!");

            }


            {

                Console.WriteLine("Welcome to Fortnite 2.0");


                int choice = int.Parse(Console.ReadLine());

                    

                Console.WriteLine("1 Play");

                if (choice == 1)

                {

                    Console.WriteLine("Starting game!");

                }

               


                Console.WriteLine("2 Settings");

                if (choice == 2)

                {

                    Console.WriteLine("Settings menu!");

                }



                Console.WriteLine("3 Quit");

                if (choice == 3)

                {

                    Console.WriteLine("Quitting game");

                }





                

            }



        }

    }

}


3D Maya Themed Diorama

This is my themed diorama work I did a campsite kind of thing with a caravan, a tent, bushes, rocks, trees and fences. I wanted to this mode...