This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | void doTheThing(const SomeEnum& enum) | |
| { | |
| const int bindedVariable = | |
| [&]() | |
| { | |
| switch(enum) | |
| { | |
| case SOME_ENUM_VAL_1: | |
| return 200; | |
| case SOME_ENUM_VAL_2; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class BaseClass | |
| { | |
| public: | |
| BaseClass(); | |
| virtual ~BaseClass(); | |
| virtual void whoAmI() | |
| { | |
| std::cout << "I'm BaseClass!" << std::endl; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <stdio.h> | |
| #include <iostream> | |
| #include <sstream> | |
| #include <vector> | |
| #include <string.h> | |
| #include <time.h> | |
| #include <algorithm> | |
| #include <bitset> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #pragma once | |
| #include <utility> | |
| template <typename T, typename ... Args> | |
| T create(Args... args) | |
| { | |
| return std::move(T(args...)); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Animation considerations: | |
| * Each drawable game object (component) has the potential to have animations. Some might not. Do we make a distinction? Do we need to? | |
| - We don't *have* to. If we solve the generic case (all drawable game components have animations), then we can simply say the static content is an animation of frame size 1. While this does require extra math for non-animated components, it should be minimal (currentFrame = (currentFrame + 1) % maxFrames), so it should be fine. If this bites us later, we can break the abstraction. Easier to have it in the first place. | |
| * Each object that does have animation can have multiple animations: idle, walking, attacking, etc. So, they need to know about the sprites for those animations and also know | |
| what animations they correspond to. What is the best way to generically store those sprites/sprite sheets such that they correspond to the correct animations? Do we just | |
| store them one by one on creation in the object's generator class? This means they would | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | template <class T> | |
| T& operator+=(T& lhs, const T& rhs) | |
| { | |
| for (typename T::size_type i = 0; i < lhs.size(); ++i) | |
| lhs[i] += rhs[i]; | |
| return lhs; | |
| } | |
| struct LoopResponse | |
| { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package AIs; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| import java.util.Random; | |
| import Game.AI; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Text; | |
| namespace SimpleSortingTest | |
| { | |
| public class SimpleSortTest | |
| { | |
| private static readonly string POSSIBLE_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | final boolean validMove = Arrays.asList(actions).contains(action); | |
| if(!validMove) { | |
| throw new IllegalStateException(String.format("%s did not enter a valid move, (other player) wins!", p)); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | namespace DXGame.Core | |
| { | |
| public interface IIdentifiable | |
| { | |
| UniqueId Id { get; } | |
| } | |
| } |