This file contains 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
// Copyright 2009, 2010, 2011 Matvei Stefarov <me@matvei.org> | |
using System; | |
using System.Linq; | |
using System.Net; | |
using fCraft.Events; | |
using JetBrains.Annotations; | |
namespace fCraft { | |
// TODO: Move logic to the relevant classes (PlayerInfo and IPBanList), when stable | |
public static class BanHelper { |
This file contains 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
public static void DoBan( [NotNull] Player player, string nameOrIP, [NotNull] string reason, | |
bool banIP, bool banAll, bool unban ) { | |
if( player == null ) throw new ArgumentNullException( "player" ); | |
if( nameOrIP == null ) { | |
player.Message( "Please specify player name or IP to ban." ); | |
return; | |
} | |
if( reason == null ) throw new ArgumentNullException( "reason" ); |
This file contains 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
#region Emotes | |
public struct EmoteData //Contains all data needed for the emotes. Emote is the trigger word, | |
//example (bullet). ID is the byte value of the char | |
{ | |
public string Emote; | |
public byte ID; | |
} | |
//this list will be loaded with the list of emotes and their replacement values | |
static List<EmoteData> EmoteTriggers = null; |
This file contains 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; | |
namespace ConsoleApplication1 //this is from Deitel Exercises 6.9 – 6.12, 6.19, 6.21, 6.26 | |
{ //To be specific, it's number 6.11 | |
class Program | |
{ | |
public static void Main( string[] args ) | |
{ | |
Console.WriteLine( "Enter however many integers out of which you would like the smallest divined:" ); | |
int howManyInts = Convert.ToInt32( Console.ReadLine() ); |
This file contains 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.Linq; | |
using System.Text; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
const double percentIncrease = 0.09; |
This file contains 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.Linq; | |
using System.Text; | |
namespace DiceRoll | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains 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.Linq; | |
using System.Text; | |
using Microsoft.Xna.Framework; | |
namespace ShipGame | |
{ | |
class MiniBoss : EnemyShip | |
{ |
This file contains 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.Linq; | |
using System.Text; | |
namespace BucketSort | |
{ | |
class Program | |
{ |
This file contains 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; | |
using System.Collections.Generic; | |
using JetBrains.Annotations; | |
namespace fCraft { | |
public class BitMap3D : IEnumerable<Vector3I> { | |
const int BitCoordMask = 31; | |
readonly uint[] store; |
This file contains 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; | |
using System.Collections.Generic; | |
using JetBrains.Annotations; | |
namespace fCraft { | |
public class BitMap3D : IEnumerable<Vector3I> { | |
const int BitCoordMask = 31; | |
readonly uint[] store; |
OlderNewer