• 0

Simple VB football game stuck


Question

pinacallada1

I am making a simple 5- a side text based football game for uni, problem is i suck at programming and have really messed it up so now im stuck as to what to do. The task description is only really to think of a simple 5 a-side game with goalkeeper (who can save), defenders (who can tackle) and attackers (who can shoot).  All players have a Name, a position and can pass, dribble and run. This includes a hasball feature which will check if a particular player has the ball. So far i have a basic code i made to work off for my classes, i can think of what i need to do exactly but i just don't know how to express it in code.

 

So far the only thing im stuck on is building classes for the interfaces below, its my first time programming this semester and im still getting used to everything. What i have to work off is follows:

 

interface IFootballPlayer

    {

        string Name { get; set; }

        bool HasBall { get; set; }

        int XPos { get; set; }

        int YPos { get; set; }

 

        void Pass(FootballPlayer receiver);

        void Dribble(int x, int y);

        void Run(int x, int y);

        string ToString();

    }

 

    interface IGoalKeeper

    {

        int SaveSkill { get; set; }

        void Save(Attacker attacker);

    }

 

    interface IDefender

    {

        int TackleSkill { get; set; }

        void Tackle(Attacker attacker);

    }

 

    interface IAttacker

    {

        int ShootSkill { get; set; }

        void Shoot(GoalKeeper goalKeeper);

    }

 

If i can get this sorted ill be able to scrape a pass hopefully

I would be grateful for any advice, C# still looks like a alien language to me

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By News Staff
      Pay What You Want for this 20-Course Programming Bundle
      by Steven Parker

      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can Pay What You Want for the The 20-Course Programming Bundle. From game development to making responsive apps, this 20-course collection has everything you need to start coding.



      What's the deal?
      With the Pay What You Want bundles, you can get something incredible for as little as you want to pay. And if you beat the average price, you’ll receive the fully upgraded bundle! Included in this Pay What You Want deal, are the following courses:

      Pay What You Want (as little as $1) for the following course:

      Image Processing with Python: Build an Instagram-Style Filter
      Develop a Photo Filter Editor from Scratch & Master Your Understanding of Matrices, Color Models & More

      Beat the average price to get the following courses as well:

      Azure Deployment for Node.js Applications
      Discover How to Deploy Your Node.js Apps to Microsoft Azure & Make Them Accessible Online

      MongoDB for Beginners
      Get Acquainted with MongoDB & Discover How to Manage Data Operations Like a Pro

      Node.js For Beginners: Create Server-Side Apps with JavaScript
      Learn How to Build Fast Web Applications with Node.js, the Server-Side Solution for JavaScript

      Intro to Next.js
      Get started with the Minimalist Framework That Allows You to Build Static, Server-Rendered React Apps

      Intro to Bootstrap
      Learn Bootstrap, the Secret to Quickly Creating Professional & Attractive Websites + Web Apps

      Create Interactive Pages with Javascript & the DOM API
      Explore the DOM API, HTML5 & Advanced JavaScript Concepts by Building Three Projects

      JavaScript Programming: Learn by Making a Mobile Game
      Dive into JavaScript's Core Concepts By Building a Game From Scratch

      HTML & CSS Course
      Learn HTML & CSS from Scratch by Creating a Responsive Landing Page

      AWS Deployment for Node.js Applications
      Discover How to Deploy Your Node.js Apps to AWS & Make Them Accessible Online

      The Complete HTML5 Mobile Game Development Course
      Use the Phaser HTML5 Framework & JavaScript Technologies to Build Cross-Platform Games

      Master Unity Game Development: Beginner's Bootcamp
      Learn Unity & C# by Creating a 3D Multi-Level Platformer Game

      Master Unity Mobile Game Development
      Learn the Quirks of Mobile Game Development with Unity

      Unity Game Development: Build a First-Person Shooter
      Master Unity by Building Your Own Version of Doom or Call of Duty

      Data Manipulation with Pandas
      Learn How to Read & Manipulate Data + Prepare It for Analysis Using the Pandas Library

      The Complete Python Data Visualization Course
      Master the Major Plotting Libraries Matplotlib, Seaborn & Bokeh + Use Them to Create Beautiful Plots

      Learn Python 3 by Making a Game
      Get up to Speed with Python by Creating Your Very Own Game

      Build a Tower Defense Game with Phaser 3
      Master the Skills Needed to Build a Complete Tower Defense Game Using Phaser 3

      Numpy Matrices & Vectors
      Take Advantage of the Numpy Library & Build Powerful + Functional Arrays and Matrices

      The Complete Responsive Web Design Course
      Learn How to Build Professional Websites That Work Across Different Devices & Platforms

      Good to know
      Certification of completion included Length of time users can access this course: lifetime Redemption deadline: redeem your code within 30 days of purchase Here's the deal:
      The bundle represents an overall retail value of $3,732 But you can Pay What You Want for the unlocked courses (as little as $1) Beat the average price and you'll take home the entire bundle. Qualify for the giveaway!
      Beat the Leader's price and get entered into the epic giveaway—plus get featured on the leaderboard!

      >> Pay What You Want for The 20-Course Programming Bundle <<
      See other Pay What You Want deals. This is a time-limited offer that ends soon.
      Get $1 credit for every $25 spent · Give $10, Get $10 · 10% off for first-time buyers.

      Not for you?
      If this offer doesn't interest you, why not check out the following offers:



      The Win Your Dream 2020 Tesla Model 3 Giveaway 20% off Ivacy VPN subscription with coupon code IVACY20 NordVPN subscription at up to 68% off for a 2 year plan Private Internet Access VPN subscription at up to 71% off Unlocator VPN or SmartDNS unblock Geoblock with 7-day free trial Subscribe to Neowin for $14 a year, or $28 a year for Ad-Free experience Disable Sponsored posts · Neowin Deals · Free eBooks · Neowin Store

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.

    • By News Staff
      Save 97% off this Complete One-Hour Coder Bundle - now just $34.99
      by Steven Parker

      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save 97% off this Complete One-Hour Coder Bundle. Train your inner programmer with 6 one-hour courses on C++, CSS, HTML, JavaScript, and Python.



      This bundle consists of the following courses:

      C++ Foundations
      Begin Your Coding Journey with the High-End, Popular C++ Language for Software & Game Development CSS Foundations
      Enhance Website Aesthetics & Designs with the Style Sheet Language CSS HTML Foundations
      Start Creating Your Own Websites, Web Apps, & More Java Foundations
      Master the General Purpose & Object-Oriented Language of Java for Mobile Development JavaScript Foundations
      Learn JavaScript for Web & HTML5 Game Development Python Foundations
      Learn the Foundations of Python for Data Science & Machine Learning Good to know
      Updates included Certification of completion included Length of time users can access this course: lifetime Redemption deadline: redeem your code within 30 days of purchase For specifications, license and instructor info please click here.

      Here's the deal:
      This Complete One-Hour Coder Bundle normally costs* $1,200, but it can be yours for just $34.99 for a limited time, that's a saving of $1,165.01 (97%) off.

      >> Get this deal, or learn more about it here <<
      See all Online Courses on offer. This is a time-limited offer that ends soon.
      Get $1 credit for every $25 spent · Give $10, Get $10 · 10% off for first-time buyers.

      Not for you?
      If this offer doesn't interest you, why not check out the following offers:



      The Win Your Dream 2020 Tesla Model 3 Giveaway 20% off Ivacy VPN subscription with coupon code IVACY20 NordVPN subscription at up to 68% off for a 2 year plan Private Internet Access VPN subscription at up to 71% off Unlocator VPN or SmartDNS unblock Geoblock with 7-day free trial Subscribe to Neowin for $14 a year, or $28 a year for Ad-Free experience Disable Sponsored posts · Neowin Deals · Free eBooks · Neowin Store

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.

    • By Steven P.
      Not quite the same as the dead When threads collide topic (which only allowed for forum topic funnies). Let's see if we can start a new game where headlines and content close together collide.
       
      I'll start (from an email newsletter from today)
       

      https://www.dutchnews.nl/news/2020/09/efteling-accused-of-cruelty-after-mother-is-arrested-over-toilet-access-for-autistic-child/
      https://www.dutchnews.nl/news/2020/09/the-netherlands-is-the-best-place-to-be-a-child-says-unicef-in-new-report/
       
    • By allan.nyholm
      Hello,
       
      Edit .. the recent purchased you see is either from my already owned software that I've reinstalled or new software that I tried getting to try and kickstart my list of Owned apps.
       
      I've just installed Windows 10 Pro on my iMac again, after being off it for a while. It's currently the only OS installed and I have a major issue with Windows Store.
       
      I consider it a major issue, but you may not. Anyway, I've purchased and downloaded a few programs like Affinity Photo and Affinity Designer and wallpaper sets from Microsoft(of their Premium uploads to the Store) from the Windows Store. I am quite a bit frustrated as the list is empty all the way down - individual listings doesn't reveal anything either i.e by selecting Apps/Games/Movies in My Library inside Windows Store on Windows 10.
       
      To make matters worse my Packard Bell laptop that uses the same Microsoft account as login also yields the exact same issue.  I am at a loss as what to do about this - I reckon it's an account issue. I am able to install my software by searching for them individually, but not from any list containing an overview of same software and various wallpaper sets. One other issue that you'll notice in my Capture6 image is that my iMac isn't on the list for Windows Store - despite just having installed and logged in to my Microsoft account at setup. This installation is the second in two days; to try and solve the issue via reinstall of Windows.
       
      These screenshots are from my iMac but the EasyNote laptop has the same look.
       
      Let me say that I have already; reset the Store Cache and deleted files manually per instructions from Microsoft Online Support Community/Forum - didn't help one bit. wsreset didn't help .
       
      Funny thing is that the online view of all my purchased is empty too. This page is available on my Microsoft account page and yours too - I would think.

      I can't say how recent this issue is with the Windows Store - I noticed it first on my EasyNote laptop and then it settled to function - then I thought to install Windows 10 on my iMac because of customization reasons. Then this.
       
      What is the experience with this from other users? Is there that one thing that can help me get a feeling of liking the experience of Windows and solve this bothersome problem? Do I need to call Microsoft and have them look through my account?






    • By Ather Fawaz
      Fortnite will be hosting the 'FreeFortnite' tournament this Sunday
      by Ather Fawaz



      Epic Games and Apple have been locking horns ever since the popular battle royale game, Fortnite, introduced a new direct payment solution that was against the App Store's policy. Resultantly, Apple booted Fortnite from the App Store. In the aftermath, Epic Games sued the Cupertino firm for its policies and mocked its famous 1984 commercial. In retaliation, Apple discontinued Epic's developer account, essentially cutting the company off from iOS and macOS developer tools.

      In the latest development in this fight, Epic Games just announced a #FreeFortnite tournament set for Sunday, August 23, which it is touting as the last opportunity for players on all platforms to play Fortnite together. This is due to the fact that the game is gearing up for its Chapter 2 - Season 4 launch on August 27, but players on iOS devices will be left behind on Chapter 2 - Season 3.

      1,200 pieces of gaming phones, consoles, and PCs will be up for grabs. These include Alienware gaming laptop, Samsung Galaxy Tab S7, OnePlus 8, PlayStation 4 Pro, Xbox One X, and Nintendo Switch. Further, any player who scores at least 10 points in the tournament can earn the Tart Tycoon Outfit and 20,000 top-scoring players will receive a special cap too.

      As expected, the device list does not contain Apple devices. After all, it is a tournament that has been dubbed as the #FreeFortnite campaign against Apple. For more details and the format of the tournament, you may follow this link.